GNU bug report logs - #61343
modules from channels is not available to "guix repl"

Previous Next

Package: guix;

Reported by: 宋文武 <iyzsong <at> envs.net>

Date: Tue, 7 Feb 2023 09:00:02 UTC

Severity: normal

Merged with 61574

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Simon Tournier <zimon.toutoune <at> gmail.com>
Subject: bug#61574: closed (Re: bug#61574: [PATCH v2] scripts: repl:
 Extend REPL %load-path with all channels.)
Date: Mon, 27 Feb 2023 14:02:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#61343: [PATCH v2] scripts: repl: Extend REPL %load-path with all channels.

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 61574 <at> debbugs.gnu.org.

-- 
61343: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61343
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Simon Tournier <zimon.toutoune <at> gmail.com>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, 61574-done <at> debbugs.gnu.org,
 61343-done <at> debbugs.gnu.org, iyzsong <at> envs.net
Subject: Re: bug#61574: [PATCH v2] scripts: repl: Extend REPL %load-path
 with all channels.
Date: Mon, 27 Feb 2023 15:01:11 +0100
Hi Simon,

Simon Tournier <zimon.toutoune <at> gmail.com> skribis:

> Fixes <https://bugs.gnu.org/61343>.
> Reported by 宋文武 <iyzsong <at> envs.net>.
>
> * guix/scripts/repl.scm (define-command): Before starting the REPL,
> run (current-profile) which makes available all channels.

[...]

> +++ b/guix/scripts/repl.scm
> @@ -211,6 +211,7 @@ (define script
>                ((guile)
>                 (save-module-excursion
>                  (lambda ()
> +                  (current-profile) ;Run (%package-module-path) as explained above.

I tweaked the comment :-) and applied.

Thanks!

Ludo’.

[Message part 3 (message/rfc822, inline)]
From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Josselin Poiret via Bug reports for GNU Guix <bug-guix <at> gnu.org>,
 Simon Tournier <zimon.toutoune <at> gmail.com>,
 宋文武 <iyzsong <at> envs.net>,
 61343 <at> debbugs.gnu.org
Cc: Josselin Poiret <dev <at> jpoiret.xyz>
Subject: [PATCH v2] scripts: repl: Extend REPL %load-path with all channels.
Date: Fri, 17 Feb 2023 15:56:27 +0100
Fixes <https://bugs.gnu.org/61343>.
Reported by 宋文武 <iyzsong <at> envs.net>.

* guix/scripts/repl.scm (define-command): Before starting the REPL,
run (current-profile) which makes available all channels.
---

Hi,

Instead I am proposing this, it avoids to load all the module.

For testing, once applied to some Guix checkout, just run:

$ ./pre-inst-env guix pull --disable-authentication -C /tmp/channels.scm -p /tmp/new
$ echo '(use-modules (rde features))' | /tmp/new/bin/guix repl /dev/stdin

where /tmp/channels.scm reads,

(list
 (channel
  (name 'rde)
  (url "https://git.sr.ht/~abcdw/rde")
  (introduction
   (make-channel-introduction
    "257cebd587b66e4d865b3537a9a88cccd7107c95"
    (openpgp-fingerprint
     "2841 9AC6 5038 7440 C7E9  2FFA 2208 D209 58C1 DEB0"))))
 (channel
  (name 'guix)
  (url "/home/simon/src/guix/guix")))

tweaking the path to your Guix checkout.

Cheers,
simon


 guix/scripts/repl.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm
index 787c63d48e..fc55d79c41 100644
--- a/guix/scripts/repl.scm
+++ b/guix/scripts/repl.scm
@@ -211,6 +211,7 @@ (define script
               ((guile)
                (save-module-excursion
                 (lambda ()
+                  (current-profile) ;Run (%package-module-path) as explained above.
                   (set-user-module)
                   ;; Do not exit repl on SIGINT.
                   ((@@ (ice-9 top-repl) call-with-sigint)

base-commit: cb45e9d0dc6cbe6f69a858f71252411610b4ce82
-- 
2.38.1




This bug report was last modified 1 year and 105 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.