summaryrefslogtreecommitdiff
path: root/tests/inferior.scm
AgeCommit message (Collapse)Author
2021-01-21repl: Fix exception handling for interpreted code.Ludovic Courtès
The 'stack' variable could be #f when code is interpreted, which in practice happens when running in "legacy" mode--i.e., when 'open-inferior' invokes "guile" instead of "guix repl". * guix/repl.scm (send-repl-response)[handle-exception]: Check whether STACK is true before passing it to 'stack->frames'. * tests/inferior.scm ("&inferior-exception, legacy mode"): New test.
2021-01-21inferior: Add 'inferior-eval-with-store' tests.Ludovic Courtès
* tests/inferior.scm ("inferior-eval-with-store, exception") ("inferior-eval-with-store, not a procedure"): New tests.
2020-03-21Merge branch 'master' into core-updatesMarius Bakke
2020-03-19inferior: '&inferior-exception' includes a stack trace.Ludovic Courtès
* guix/inferior.scm (port->inferior): Bump protocol to (0 1 1). (&inferior-exception)[stack]: New field. (read-repl-response): Recognize 'exception' form for protocol (0 1 1). * tests/inferior.scm ("&inferior-exception"): Check the value returned by 'inferior-exception-stack'.
2020-03-17tests: Fix up reference to 'guile-2.2'.Ludovic Courtès
This is a followup to b6bee63bed4f013064c0d902e7c8b83ed7514ade. * tests/inferior.scm ("inferior-package-search-paths"): Refer to 'guile-3.0' instead of 'guile-2.2'.
2020-03-12inferior: Distinguish inferior exceptions.Ludovic Courtès
This avoids ambiguities when looking at a backtrace where the exception was actually thrown by an inferior in a very different context. * guix/inferior.scm (&inferior-exception): New condition type. (read-repl-response): Add optional 'inferior' parameter. Raise '&inferior-exception' instead of rethrowing to KEY when receiving an 'exception' message. (read-inferior-response): Pass INFERIOR to 'read-repl-response'. * tests/inferior.scm ("&inferior-exception"): New test.
2019-09-21inferior: Propagate '&store-protocol-error' error conditions.Ludovic Courtès
Until now '&store-protocol-error' conditions raised in the inferior would not be correctly propagated because SRFI-35 records lack a read syntax. Reported at <https://bugs.gnu.org/37449> by Carl Dong <contact@carldong.me>. * guix/inferior.scm (port->inferior): Import (srfi srfi-34) in the inferior. (inferior-eval-with-store): Define 'error?' and 'error-message'. Wrap call to PROC in 'guard'. Check the response of INFERIOR for a 'store-protocol-error' or a 'result' tag. * tests/inferior.scm ("inferior-eval-with-store, &store-protocol-error"): New test.
2019-02-12inferior: Add 'inferior-available-packages'.Ludovic Courtès
* guix/inferior.scm (inferior-available-packages): New procedure. * tests/inferior.scm ("inferior-available-packages"): New test.
2018-11-28inferior: Add 'inferior-eval-with-store'.Ludovic Courtès
* guix/inferior.scm (inferior-eval-with-store): New procedure, with code formerly in 'inferior-package-derivation'. (inferior-package-derivation): Rewrite in terms of 'inferior-eval-with-store'. * tests/inferior.scm ("inferior-eval-with-store"): New test.
2018-09-21profiles: 'packages->manifest' now accepts inferior packages.Ludovic Courtès
* guix/profiles.scm (packages->manifest)[inferiors-loaded?]: New variable. [inferior->entry]: New procedure. Accept inferior packages when INFERIORS-LOADED? is true. * tests/guix-package.sh: Add test using a manifest with an inferior. * tests/inferior.scm ("packages->manifest"): New test.
2018-09-21inferior: Add 'inferior-package->manifest-entry'.Ludovic Courtès
* guix/inferior.scm (inferior-package->manifest-entry): New procedure. * tests/inferior.scm (manifest-entry->list): New procedure. ("inferior-package->manifest-entry"): New test.
2018-09-21inferior: Add 'inferior-package-search-paths' & co.Ludovic Courtès
* guix/inferior.scm (%inferior-package-search-paths) (inferior-package-native-search-paths) (inferior-package-search-paths) (inferior-package-transitive-native-search-paths): New procedures. * tests/inferior.scm ("inferior-package-search-paths"): New test.
2018-09-21inferior: Add 'inferior-package-inputs' & co.Ludovic Courtès
* guix/inferior.scm (open-inferior): Use (ice-9 match). (inferior-package-input-field, inferior-package-inputs): (inferior-package-native-inputs) (inferior-package-propagated-inputs) (inferior-package-transitive-propagated-inputs): New procedures. * tests/inferior.scm ("inferior-package-inputs"): New test. inputs fixlet
2018-09-21inferior: Add 'lookup-inferior-packages'.Ludovic Courtès
* guix/inferior.scm (<inferior>)[packages, table]: New fields. (open-inferior): Initialize these new fields. (inferior-packages): Rename to... (%inferior-packages): ... this. (inferior-packages): New procedure; force the promise. (%inferior-package-table, lookup-inferior-packages): New procedures. * tests/inferior.scm ("lookup-inferior-packages") ("lookup-inferior-packages and eq?-ness"): New tests.
2018-09-21inferior: Add 'inferior-package-derivation'.Ludovic Courtès
* guix/inferior.scm (read-inferior-response) (send-inferior-request): New procedures. (inferior-eval): Rewrite in terms of these. (proxy, inferior-package-derivation, inferior-package->derivation) (package-compiler): New procedures. * tests/inferior.scm ("inferior-package-derivation"): New test.
2018-09-04inferior: Add home-page and location package accessors.Ludovic Courtès
* guix/inferior.scm (inferior-package-home-page) (inferior-package-location): New procedures. * tests/inferior.scm ("inferior-packages"): Test them.
2018-07-13Add (guix inferior) and (guix scripts repl).Ludovic Courtès
* guix/inferior.scm, guix/scripts/repl.scm, tests/inferior.scm: New files. * Makefile.am (MODULES): Add 'guix/scripts/repl.scm' and 'guix/inferior.scm'. (SCM_TESTS): Add 'tests/inferior.scm'. * doc/guix.texi (Invoking guix repl): New node.