summaryrefslogtreecommitdiff
path: root/guix/inferior.scm
Commit message (Collapse)AuthorAge
* inferior: '&inferior-exception' includes a stack trace.Ludovic Courtès2020-03-19
| | | | | | | | * 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'.
* inferior: Adjust to protocol (0 1).Ludovic Courtès2020-03-19
| | | | | * guix/inferior.scm (port->inferior): For protocol (0 x ...), where x >= 1, send the (() repl-version ...) form.
* inferior: Distinguish inferior exceptions.Ludovic Courtès2020-03-12
| | | | | | | | | | | | 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.
* More module autoload adjustments.Ludovic Courtès2020-01-15
| | | | | | | | This is a followup to 7a0836cffdfe3ab9ee899602f218277646959144. * guix/scripts/package.scm: Adjust binding list of the (guix store roots) autoload. * guix/inferior.scm: Adjust binding list of the (guix cache) autoload.
* inferior: Add 'inferior-package-provenance'.Ludovic Courtès2019-12-29
| | | | * guix/inferior.scm (inferior-package-provenance): New procedure.
* inferior: 'cached-channel-instance' takes an open store connection.Konrad Hinsen2019-11-15
| | | | | | | | | | | * guix/inferior.scm (cached-channel-instance): Take an explicit 'store' argument. (inferior-for-channels): Wrap call to 'cached-channel-instance' in 'with-store'. * guix/time-machine.scm (guix-time-machine): Wrap call to 'cached-channel-instance' in 'with-store'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* Add 'guix time-machine'.Konrad Hinsen2019-11-15
| | | | | | | | | | | | * guix/scripts/time-machine.scm: New file. * Makefile.am: (MODULES): Add it. * guix/scripts/pull.scm (channel-list): Export. * guix/inferior.scm (cached-channel-instance): New procedure. (inferior-for-channels): Use it. * doc/guix.texi (Invoking guix time-machine): New section. (Channels): Cross-reference it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* inferior: Set the error port when using older Guix versions.Christopher Baines2019-10-15
| | | | | | | This makes the behaviour more consistent. * guix/inferior.scm (inferior-pipe): Wrap the second open-pipe* call with with-error-to-port, to match the first call to open-pipe*.
* inferior: Allow controlling the inferior error port.Christopher Baines2019-10-15
| | | | | | | | | | Previously, stderr for the inferior process would always be sent to /dev/null because the current-output-port when the process is launched is a void port. This change means that it's possible to pass in a different port to use. * guix/inferior.scm (inferior-pipe): Take the error-port as an argument. (open-inferior): Add new error-port keyword argument, with a default of (%make-void-port "w").
* inferior: Change to use the (guix repl) module.Christopher Baines2019-10-01
| | | | | | | | | | Rather than (guix scripts repl), from which the machine-repl procedure was removed in [1]. 1: 92a4087bf4862d5ba9b77111eba3c68c2a1c4679 * guix/inferior.scm (inferior-pipe): Load (guix repl) rather than (guix scripts repl).
* inferior: Fix typo.Vagrant Cascadian2019-09-23
| | | | * guix/inferior: Fix spelling of "specifications".
* inferior: Propagate '&store-protocol-error' error conditions.Ludovic Courtès2019-09-21
| | | | | | | | | | | | | | | | 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.
* inferior: Add 'read-repl-response'.Ludovic Courtès2019-07-04
| | | | | * guix/inferior.scm (read-repl-response): New procedure. (read-inferior-response): Use it.
* channels: Do not fail when the inferior lacks 'guix repl'.Ludovic Courtès2019-03-08
| | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/34637>. Reported by Martin Flack <martin.flack@gmail.com>. Previously we'd fail to build the package cache for old versions of Guix that lack 'guix repl'. Now we simply ignore the issue and keep going without a cache. * guix/inferior.scm (gexp->derivation-in-inferior): Add #:silent-failure? and honor it. [drop-extra-keyword]: New procedure. Use it. * guix/channels.scm (package-cache-file): Pass #:silent-failure? #t.
* inferior: Add 'inferior-available-packages'.Ludovic Courtès2019-02-12
| | | | | * guix/inferior.scm (inferior-available-packages): New procedure. * tests/inferior.scm ("inferior-available-packages"): New test.
* store: Rename <nix-server> to <store-connection>.Ludovic Courtès2019-01-21
| | | | | | | | | | * guix/store.scm (<nix-server>): Rename to... (<store-connection>): ... this. Adjust users accordingly. (nix-server?, nix-server-major-version) (nix-server-minor-version, nix-server-socket) (nix-server-version): Define as deprecated aliases. * guix/inferior.scm: Adjust accordingly. * guix/ssh.scm: Likewise.
* inferior: 'gexp->derivation-in-inferior' honors EXP's load path.Ludovic Courtès2019-01-20
| | | | | | | | | | | | Previously the imported modules and extensions of EXP would be missing from the load path of 'guix repl'. * guix/inferior.scm (gexp->derivation-in-inferior)[script]: New variable. [trampoline]: Write (primitive-load #$script) to PIPE. Add #$output. * tests/channels.scm ("channel-instances->manifest")[depends?]: Check for requisites rather than direct references. Adjust callers accordingly.
* inferior: Add 'gexp->derivation-in-inferior'.Ludovic Courtès2019-01-15
| | | | * guix/inferior.scm (gexp->derivation-in-inferior): New procedure.
* Remove most uses of the _IO*F constants.Ludovic Courtès2019-01-09
| | | | | | | | | | | | | | | | | | | | | | | | These constants, for use with 'setvbuf', were deprecated in Guile 2.2 and disappeared in Guile 3.0. Here we keep these constants in build-side code where removing them is not feasible. * guix/build/download-nar.scm (download-nar): Adjust 'setvbuf' calls to the Guile 2.2+ API. * guix/build/download.scm (open-socket-for-uri): Likewise. (open-connection-for-uri, url-fetch): Likewise. * guix/build/make-bootstrap.scm (make-stripped-libc): Likewise. * guix/build/union.scm (setvbuf) [guile-2.0]: New conditional wrapper. (union-build): Adjust to new API. * guix/ftp-client.scm (ftp-open, ftp-list, ftp-retr): Likewise. * guix/http-client.scm (http-fetch): Likewise. * guix/inferior.scm (proxy): Likewise. * guix/scripts/substitute.scm (fetch, http-multiple-get): Likewise. * guix/self.scm (compiled-modules): Likewise. * guix/ssh.scm (remote-daemon-channel, store-import-channel) (store-export-channel): Likewise. * guix/ui.scm (initialize-guix): Likewise. * tests/publish.scm (http-get-port): Likewise. * guix/store.scm (%newlines): Adjust comment.
* maint: Remove 'cond-expand' forms for Guile 2.0.Ludovic Courtès2019-01-09
| | | | | | | | | | | | | | | | | | | | | | Note: Leave 'cond-expand' forms used in the build-side modules that can run on %BOOTSTRAP-GUILE, which is currently Guile 2.0. * guix/build/compile.scm: Move 'use-modules' clause from 'cond-expand' to 'define-module' form. (%default-optimizations): Remove 'cond-expand'. * guix/build/download.scm (tls-wrap): Remove 'cond-expand'. * guix/build/syscalls.scm: Remove 'cond-expand' form around '%set-automatic-finalization-enabled?!' and 'without-automatic-finalization'. * guix/inferior.scm (port->inferior): Remove 'cond-expand'. * guix/scripts/pack.scm (wrapped-package)[build]: Remove 'cond-expand'. * guix/status.scm (build-event-output-port): Remove 'cond-expand'. * guix/store.scm (open-inet-socket): Remove 'cond-expand'. * guix/ui.scm (install-locale): Remove 'cond-expand'. * tests/status.scm ("current-build-output-port, UTF-8 + garbage"): Remove 'cond-expand'. * tests/store.scm ("current-build-output-port, UTF-8 + garbage"): Remove 'cond-expand'.
* ssh: Add 'remote-inferior'.Ludovic Courtès2018-12-24
| | | | | | | | | * guix/inferior.scm (<inferior>)[close]: New field. (port->inferior): New procedure. (open-inferior): Rewrite in terms of 'port->inferior'. (close-inferior): Honor INFERIOR's 'close' field. (inferior-eval-with-store): Add FIXME comment. * guix/ssh.scm (remote-inferior): New procedure.
* inferior: Add 'inferior-eval-with-store'.Ludovic Courtès2018-11-28
| | | | | | | | * 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.
* inferior: Add 'inferior-for-channels'.Ludovic Courtès2018-09-21
| | | | | * guix/inferior.scm (%inferior-cache-directory): New variable. (inferior-for-channels): New procedure.
* inferior: Add 'inferior-package->manifest-entry'.Ludovic Courtès2018-09-21
| | | | | | * guix/inferior.scm (inferior-package->manifest-entry): New procedure. * tests/inferior.scm (manifest-entry->list): New procedure. ("inferior-package->manifest-entry"): New test.
* inferior: Add 'inferior-package-search-paths' & co.Ludovic Courtès2018-09-21
| | | | | | | | * 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.
* inferior: Add 'inferior-package-inputs' & co.Ludovic Courtès2018-09-21
| | | | | | | | | | | * 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
* inferior: Add 'lookup-inferior-packages'.Ludovic Courtès2018-09-21
| | | | | | | | | | | * 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.
* inferior: Add 'inferior-package-derivation'.Ludovic Courtès2018-09-21
| | | | | | | | | * 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.
* inferior: Add home-page and location package accessors.Ludovic Courtès2018-09-04
| | | | | | * guix/inferior.scm (inferior-package-home-page) (inferior-package-location): New procedures. * tests/inferior.scm ("inferior-packages"): Test them.
* inferior: Adjust for Guile 2.0.Ludovic Courtès2018-08-21
| | | | | | | Partly fixes <https://bugs.gnu.org/32326>. Reported by Michael Bowcutt <mbowcutt@riseup.net>. * guix/inferior.scm (open-inferior): Wrap 'setvbuf' call in 'cond-expand'.
* Add (guix inferior) and (guix scripts repl).Ludovic Courtès2018-07-13
* 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.