* bug#61343: modules from channels is not available to "guix repl"
@ 2023-02-07 8:59 宋文武 via Bug reports for GNU Guix
2023-02-14 19:22 ` Simon Tournier
2024-03-03 5:54 ` bug#61343: bug#61574: bug#61343: bug#61574: [PATCH] scripts: repl: Extend REPL %load-path with all channels. For real Richard Sent
0 siblings, 2 replies; 11+ messages in thread
From: 宋文武 via Bug reports for GNU Guix @ 2023-02-07 8:59 UTC (permalink / raw)
To: 61343
I have add the rde channel to my guix, and "guix pull".
--8<---------------cut here---------------start------------->8---
(cons*
(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"))))
%default-channels)
--8<---------------cut here---------------end--------------->8---
But then, Run:
echo '(use-modules (rde features))' | guix repl /dev/stdin
Will get error: no code for module (rde features)
Well, Run:
echo '(use-modules (gnu packages) (rde features))' | guix repl /dev/stdin
Will pass!
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#61343: modules from channels is not available to "guix repl"
2023-02-07 8:59 bug#61343: modules from channels is not available to "guix repl" 宋文武 via Bug reports for GNU Guix
@ 2023-02-14 19:22 ` Simon Tournier
2023-02-16 21:14 ` bug#61343: [PATCH] scripts: repl: Load (gnu packages) to set up %load-path Josselin Poiret via Bug reports for GNU Guix
2024-03-03 5:54 ` bug#61343: bug#61574: bug#61343: bug#61574: [PATCH] scripts: repl: Extend REPL %load-path with all channels. For real Richard Sent
1 sibling, 1 reply; 11+ messages in thread
From: Simon Tournier @ 2023-02-14 19:22 UTC (permalink / raw)
To: 宋文武, 61343
Hi,
On mar., 07 févr. 2023 at 16:59, 宋文武 via Bug reports for GNU Guix <bug-guix@gnu.org> wrote:
> --8<---------------cut here---------------start------------->8---
> (cons*
> (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"))))
> %default-channels)
> --8<---------------cut here---------------end--------------->8---
>
> But then, Run:
> echo '(use-modules (rde features))' | guix repl /dev/stdin
> Will get error: no code for module (rde features)
>
> Well, Run:
> echo '(use-modules (gnu packages) (rde features))' | guix repl /dev/stdin
> Will pass!
Yes, somehow a bug with the load path.
--8<---------------cut here---------------start------------->8---
$ guix time-machine -C /tmp/channels.scm -- repl -q
GNU Guile 3.0.9
Copyright (C) 1995-2023 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
scheme@(guix-user)> ,pp %load-path
$1 = ("/gnu/store/n7h2ggfgljikvy9xlppsihvhgqj6bprd-guix-module-union/share/guile/site/3.0"
"/gnu/store/kphp5d85rrb3q1rdc2lfqc1mdklwh3qp-guile-3.0.9/share/guile/3.0"
"/gnu/store/kphp5d85rrb3q1rdc2lfqc1mdklwh3qp-guile-3.0.9/share/guile/3.0"
"/gnu/store/kphp5d85rrb3q1rdc2lfqc1mdklwh3qp-guile-3.0.9/share/guile/site/3.0"
"/gnu/store/kphp5d85rrb3q1rdc2lfqc1mdklwh3qp-guile-3.0.9/share/guile/site"
"/gnu/store/kphp5d85rrb3q1rdc2lfqc1mdklwh3qp-guile-3.0.9/share/guile"
"/home/simon/.guix-profile/share/guile/site/3.0"
"/home/simon/.config/guix/profiles/emacs/emacs/share/guile/site/3.0"
"/home/simon/.guix-profile/share/guile/site/3.0"
"/home/simon/.config/guix/profiles/emacs/emacs/share/guile/site/3.0")
scheme@(guix-user)> (use-modules (gnu packages))
scheme@(guix-user)> ,pp %load-path
$2 = ("/gnu/store/n7h2ggfgljikvy9xlppsihvhgqj6bprd-guix-module-union/share/guile/site/3.0"
"/gnu/store/kphp5d85rrb3q1rdc2lfqc1mdklwh3qp-guile-3.0.9/share/guile/3.0"
"/gnu/store/kphp5d85rrb3q1rdc2lfqc1mdklwh3qp-guile-3.0.9/share/guile/3.0"
"/gnu/store/kphp5d85rrb3q1rdc2lfqc1mdklwh3qp-guile-3.0.9/share/guile/site/3.0"
"/gnu/store/kphp5d85rrb3q1rdc2lfqc1mdklwh3qp-guile-3.0.9/share/guile/site"
"/gnu/store/kphp5d85rrb3q1rdc2lfqc1mdklwh3qp-guile-3.0.9/share/guile"
"/home/simon/.guix-profile/share/guile/site/3.0"
"/home/simon/.config/guix/profiles/emacs/emacs/share/guile/site/3.0"
"/home/simon/.guix-profile/share/guile/site/3.0"
"/home/simon/.config/guix/profiles/emacs/emacs/share/guile/site/3.0"
"/gnu/store/nf3z5kqjybi687v8li2dcbc5i49zm15s-rde/share/guile/site/3.0")
scheme@(guix-user)> ,use(srfi srfi-1)
scheme@(guix-user)> (lset-difference string=? $2 $1)
$3 = ("/gnu/store/nf3z5kqjybi687v8li2dcbc5i49zm15s-rde/share/guile/site/3.0")
scheme@(guix-user)> ,q
$ ls /gnu/store/nf3z5kqjybi687v8li2dcbc5i49zm15s-rde/share/guile/site/3.0
contrib gnu rde
--8<---------------cut here---------------end--------------->8---
From my understanding, it is about %package-module-path not activated by
“guix repl“; I do not know if it is a bug or a feature. :-)
Cheers,
simon
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#61343: [PATCH] scripts: repl: Load (gnu packages) to set up %load-path.
2023-02-14 19:22 ` Simon Tournier
@ 2023-02-16 21:14 ` Josselin Poiret via Bug reports for GNU Guix
2023-02-17 3:09 ` 宋文武 via Bug reports for GNU Guix
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Josselin Poiret via Bug reports for GNU Guix @ 2023-02-16 21:14 UTC (permalink / raw)
To: Simon Tournier, 宋文武, 61343; +Cc: Josselin Poiret
* guix/scripts/repl.scm: Add (gnu packages) to the used modules so that channel
Scheme files are available straight away.
---
Hi both of you,
I don't think there's a reason for that, other than no one realizing before.
Here's a simple fix, freshly tested.
guix/scripts/repl.scm | 1 +
1 file changed, 1 insertion(+)
diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm
index 787c63d48e..407f5b2b38 100644
--- a/guix/scripts/repl.scm
+++ b/guix/scripts/repl.scm
@@ -22,6 +22,7 @@ (define-module (guix scripts repl)
#:use-module (guix ui)
#:use-module (guix scripts)
#:use-module (guix repl)
+ #:use-module (gnu packages) ;; To extend %load-path with channels
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-37)
base-commit: 312f1f41d3f3f3e5d2c36ff46920c6dce1c21a17
--
2.39.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* bug#61343: [PATCH] scripts: repl: Load (gnu packages) to set up %load-path.
2023-02-16 21:14 ` bug#61343: [PATCH] scripts: repl: Load (gnu packages) to set up %load-path Josselin Poiret via Bug reports for GNU Guix
@ 2023-02-17 3:09 ` 宋文武 via Bug reports for GNU Guix
2023-02-17 14:56 ` bug#61574: [PATCH v2] scripts: repl: Extend REPL %load-path with all channels Simon Tournier
2023-02-17 15:21 ` bug#61343: [PATCH] scripts: repl: Load (gnu packages) to set up %load-path Simon Tournier
2 siblings, 0 replies; 11+ messages in thread
From: 宋文武 via Bug reports for GNU Guix @ 2023-02-17 3:09 UTC (permalink / raw)
To: Josselin Poiret; +Cc: 61343, Simon Tournier
Josselin Poiret <dev@jpoiret.xyz> writes:
> * guix/scripts/repl.scm: Add (gnu packages) to the used modules so that channel
> Scheme files are available straight away.
> ---
> Hi both of you,
>
> I don't think there's a reason for that, other than no one realizing before.
> Here's a simple fix, freshly tested.
>
> guix/scripts/repl.scm | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm
> index 787c63d48e..407f5b2b38 100644
> --- a/guix/scripts/repl.scm
> +++ b/guix/scripts/repl.scm
> @@ -22,6 +22,7 @@ (define-module (guix scripts repl)
> #:use-module (guix ui)
> #:use-module (guix scripts)
> #:use-module (guix repl)
> + #:use-module (gnu packages) ;; To extend %load-path with channels
It's not clear to me why load (gnu packages) will/should extend
%load-path, a suprise side effect!
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#61574: [PATCH v2] scripts: repl: Extend REPL %load-path with all channels.
2023-02-16 21:14 ` bug#61343: [PATCH] scripts: repl: Load (gnu packages) to set up %load-path Josselin Poiret via Bug reports for GNU Guix
2023-02-17 3:09 ` 宋文武 via Bug reports for GNU Guix
@ 2023-02-17 14:56 ` Simon Tournier
2023-02-27 14:01 ` bug#61343: " Ludovic Courtès
2023-02-17 15:21 ` bug#61343: [PATCH] scripts: repl: Load (gnu packages) to set up %load-path Simon Tournier
2 siblings, 1 reply; 11+ messages in thread
From: Simon Tournier @ 2023-02-17 14:56 UTC (permalink / raw)
To: 61574, zimon.toutoune, iyzsong, 61343; +Cc: Josselin Poiret
Fixes <https://bugs.gnu.org/61343>.
Reported by 宋文武 <iyzsong@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
^ permalink raw reply related [flat|nested] 11+ messages in thread
* bug#61343: [PATCH] scripts: repl: Load (gnu packages) to set up %load-path.
2023-02-16 21:14 ` bug#61343: [PATCH] scripts: repl: Load (gnu packages) to set up %load-path Josselin Poiret via Bug reports for GNU Guix
2023-02-17 3:09 ` 宋文武 via Bug reports for GNU Guix
2023-02-17 14:56 ` bug#61574: [PATCH v2] scripts: repl: Extend REPL %load-path with all channels Simon Tournier
@ 2023-02-17 15:21 ` Simon Tournier
2 siblings, 0 replies; 11+ messages in thread
From: Simon Tournier @ 2023-02-17 15:21 UTC (permalink / raw)
To: 宋文武, 61343, Josselin Poiret
Hi Josselin,
To send my comment as v2, I did:
git send-email --to="Josselin Poiret via Bug reports for GNU Guix <bug-guix@gnu.org>" \
--to="Simon Tournier <zimon.toutoune@gmail.com>" \
--to="宋文武 <iyzsong@envs.net>" \
--to="61343@debbugs.gnu.org" \
--cc="Josselin Poiret <dev@jpoiret.xyz>" \
--in-reply-to="e0ffbcbb07fe41a04688223342461aa4d3310142.1676582046.git.dev@jpoiret.xyz" \
v2-0001-scripts-repl-Extend-REPL-load-path-with-all-chann.patch
well, the keys ’cG’ from Emacs-Notmuch. ;-)
The issue is that it triggers a new issue number (that I have merged)
because of,
"Josselin Poiret via Bug reports for GNU Guix <bug-guix@gnu.org>"
Well, I am always confused by some Debbugs internals; I thought that
’in-reply-to’ would be enough to avoid the creation of a new issue.
Hum?
Therefore, my questions are: how do you reply?
And if someone could explain me: Why is Debbugs confused with this
remaining <bug-guix@gnu.org>?
Cheers,
simon
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#61343: bug#61574: [PATCH v2] scripts: repl: Extend REPL %load-path with all channels.
2023-02-17 14:56 ` bug#61574: [PATCH v2] scripts: repl: Extend REPL %load-path with all channels Simon Tournier
@ 2023-02-27 14:01 ` Ludovic Courtès
2023-03-02 13:44 ` bug#61574: " Andrew Tropin
0 siblings, 1 reply; 11+ messages in thread
From: Ludovic Courtès @ 2023-02-27 14:01 UTC (permalink / raw)
To: Simon Tournier; +Cc: Josselin Poiret, 61574-done, 61343-done, iyzsong
Hi Simon,
Simon Tournier <zimon.toutoune@gmail.com> skribis:
> Fixes <https://bugs.gnu.org/61343>.
> Reported by 宋文武 <iyzsong@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’.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#61574: bug#61343: bug#61574: [PATCH v2] scripts: repl: Extend REPL %load-path with all channels.
2023-02-27 14:01 ` bug#61343: " Ludovic Courtès
@ 2023-03-02 13:44 ` Andrew Tropin
2023-03-02 19:48 ` bug#61343: " Simon Tournier
0 siblings, 1 reply; 11+ messages in thread
From: Andrew Tropin @ 2023-03-02 13:44 UTC (permalink / raw)
To: Ludovic Courtès, Simon Tournier
Cc: Josselin Poiret, 61343-done, 61574-done, iyzsong
[-- Attachment #1: Type: text/plain, Size: 959 bytes --]
On 2023-02-27 15:01, Ludovic Courtès wrote:
> Hi Simon,
>
> Simon Tournier <zimon.toutoune@gmail.com> skribis:
>
>> Fixes <https://bugs.gnu.org/61343>.
>> Reported by 宋文武 <iyzsong@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!
Hi Simon and Ludo!
Thank you for the patch, I also faced this problem and it seems this
change doesn't fix it.
echo '(use-modules (rde features))' | guix repl /dev/stdin
still fails on a7763e067d86908210758aab80d33e4f8b815b1c.
--
Best regards,
Andrew Tropin
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#61343: bug#61574: bug#61343: bug#61574: [PATCH v2] scripts: repl: Extend REPL %load-path with all channels.
2023-03-02 13:44 ` bug#61574: " Andrew Tropin
@ 2023-03-02 19:48 ` Simon Tournier
2023-03-03 11:14 ` Ludovic Courtès
0 siblings, 1 reply; 11+ messages in thread
From: Simon Tournier @ 2023-03-02 19:48 UTC (permalink / raw)
To: Andrew Tropin, Ludovic Courtès
Cc: 61574, Josselin Poiret, 61343, iyzsong
Hi,
I reopen the bug.
On jeu., 02 mars 2023 at 17:44, Andrew Tropin <andrew@trop.in> wrote:
> Thank you for the patch, I also faced this problem and it seems this
> change doesn't fix it.
Indeed. I have no clue what I messed up. Since I removed the Git
worktree, I am not able to investigate the root of my mistake. I
remember running with ’guix repl -q’ for avoiding spurious ~/.guile
configuration and I remember running “./pre-inst-env guix pull -p
/tmp/new” and checking. Hum?! Anyway!
My apologies.
Back to the issue:
1. The patch does not tweak ’guix repl script.scm’ but only the
interactive part – which also has the issue, I guess.
2. The culprit seems (current-profile) which does not correctly load
%package-module-path as the comment is suggesting,
;; This in turn ensures that
;; (%package-module-path) will contain entries for the channels
;; available in the current profile.
Adding (gnu packages) as Josselin suggested but commenting
(current-profile) make channels available both for scripts and
interactive. For instance this patch works, which means something is
buggy somewhere.
--8<---------------cut here---------------start------------->8---
1 file changed, 5 insertions(+), 2 deletions(-)
guix/scripts/repl.scm | 7 +++++--
modified guix/scripts/repl.scm
@@ -22,6 +22,7 @@ (define-module (guix scripts repl)
#:use-module (guix ui)
#:use-module (guix scripts)
#:use-module (guix repl)
+ #:use-module (gnu packages)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-37)
@@ -193,7 +194,8 @@ (define script
;; 'set-program-arguments'. This in turn ensures that
;; (%package-module-path) will contain entries for the channels
;; available in the current profile.
- (current-profile)
+ (pk 'script)
+ ;(current-profile)
(set-program-arguments script)
(set-user-module)
@@ -211,7 +213,8 @@ (define script
((guile)
(save-module-excursion
(lambda ()
- (current-profile) ;Run (%package-module-path) as explained above.
+ (pk 'no-script)
+ ;(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)
--8<---------------cut here---------------end--------------->8---
Well, I have tried to debug by adding ’pk’ around but I often get error
when “Computing Guix derivation”. Well, the test-error is a long
process here. :-)
As discussed in #42688 [1], instead of
1b179d7876f19f04009a2f9e248ac10711f4c660, the plain call to
(%package-module-path) – instead of (current-profile) – fixes the issue.
This patch works and avoids the full load of (gnu packages), I guess
twice. :-)
--8<---------------cut here---------------start------------->8---
1 file changed, 3 insertions(+), 3 deletions(-)
guix/scripts/repl.scm | 6 +++---
modified guix/scripts/repl.scm
@@ -27,7 +27,7 @@ (define-module (guix scripts repl)
#:use-module (srfi srfi-37)
#:use-module (ice-9 match)
#:use-module (rnrs bytevectors)
- #:autoload (guix describe) (current-profile)
+ #:autoload (gnu packages) (%package-module-path)
#:autoload (system repl repl) (start-repl)
#:autoload (system repl server)
(make-tcp-server-socket make-unix-domain-server-socket)
@@ -193,7 +193,7 @@ (define script
;; 'set-program-arguments'. This in turn ensures that
;; (%package-module-path) will contain entries for the channels
;; available in the current profile.
- (current-profile)
+ (%package-module-path)
(set-program-arguments script)
(set-user-module)
@@ -211,7 +211,7 @@ (define script
((guile)
(save-module-excursion
(lambda ()
- (current-profile) ;Run (%package-module-path) as explained above.
+ (%package-module-path)
(set-user-module)
;; Do not exit repl on SIGINT.
((@@ (ice-9 top-repl) call-with-sigint)
--8<---------------cut here---------------end--------------->8---
1: <https://issues.guix.gnu.org/issue/42688>
Cheers,
simon
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#61343: bug#61574: bug#61343: bug#61574: [PATCH v2] scripts: repl: Extend REPL %load-path with all channels.
2023-03-02 19:48 ` bug#61343: " Simon Tournier
@ 2023-03-03 11:14 ` Ludovic Courtès
0 siblings, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2023-03-03 11:14 UTC (permalink / raw)
To: Simon Tournier; +Cc: 61574, Josselin Poiret, 61343, iyzsong, Andrew Tropin
Simon Tournier <zimon.toutoune@gmail.com> skribis:
> 1 file changed, 3 insertions(+), 3 deletions(-)
> guix/scripts/repl.scm | 6 +++---
>
> modified guix/scripts/repl.scm
> @@ -27,7 +27,7 @@ (define-module (guix scripts repl)
> #:use-module (srfi srfi-37)
> #:use-module (ice-9 match)
> #:use-module (rnrs bytevectors)
> - #:autoload (guix describe) (current-profile)
> + #:autoload (gnu packages) (%package-module-path)
> #:autoload (system repl repl) (start-repl)
> #:autoload (system repl server)
> (make-tcp-server-socket make-unix-domain-server-socket)
> @@ -193,7 +193,7 @@ (define script
> ;; 'set-program-arguments'. This in turn ensures that
> ;; (%package-module-path) will contain entries for the channels
> ;; available in the current profile.
> - (current-profile)
> + (%package-module-path)
Per the comment right above, this change would break the program name
memoization, wouldn’t it?
Ludo’.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#61343: bug#61574: bug#61343: bug#61574: [PATCH] scripts: repl: Extend REPL %load-path with all channels. For real.
2023-02-07 8:59 bug#61343: modules from channels is not available to "guix repl" 宋文武 via Bug reports for GNU Guix
2023-02-14 19:22 ` Simon Tournier
@ 2024-03-03 5:54 ` Richard Sent
1 sibling, 0 replies; 11+ messages in thread
From: Richard Sent @ 2024-03-03 5:54 UTC (permalink / raw)
To: 61343; +Cc: dev, zimon.toutoune
I'm not sure as to the comments regarding program name memoization, but
could the solution be as simple as adding the call to
(%package-module-path) without deleting (current-profile)?
There's probably a more elegant solution, but I found that this patch
resolved the issue:
--8<---------------cut here---------------start------------->8---
guix/scripts/repl.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm
index cb71e59b05..c8e875eb05 100644
--- a/guix/scripts/repl.scm
+++ b/guix/scripts/repl.scm
@@ -26,6 +26,7 @@ (define-module (guix scripts repl)
#:use-module (srfi srfi-37)
#:use-module (ice-9 match)
#:autoload (guix describe) (current-profile)
+ #:autoload (gnu packages) (%package-module-path)
#:autoload (system repl repl) (start-repl)
#:autoload (system repl server)
(make-tcp-server-socket make-unix-domain-server-socket)
@@ -192,8 +193,8 @@ (define-command (guix-repl . args)
;; (%package-module-path) will contain entries for the channels
;; available in the current profile.
(current-profile)
-
(set-program-arguments script)
+ (%package-module-path)
(set-user-module)
;; When passed a relative file name, 'load-in-vicinity' searches the
@@ -209,7 +210,6 @@ (define-command (guix-repl . args)
((guile)
(save-module-excursion
(lambda ()
- (current-profile) ;populate (%package-module-path); see above
(set-user-module)
;; Do not exit repl on SIGINT.
((@@ (ice-9 top-repl) call-with-sigint)
base-commit: 6f5ea7ac1acb3d1c53baf7620cca66cc87fe5a73
--
2.41.0
--8<---------------cut here---------------end--------------->8---
The previous fix in 96739561b87db592716431953cfbbb614e8ff87a did not
matter in my testing, so with that + earlier discussion I removed the
second (current-profile) call.
I have a barebones channel set up at
https://git.sr.ht/~freakingpenguin/channel-demo if it's of any help for
reproducing the issue. Just a couple of Guile scripts + guix
time-machine wrappers.
--
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.
^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-03-03 5:55 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-07 8:59 bug#61343: modules from channels is not available to "guix repl" 宋文武 via Bug reports for GNU Guix
2023-02-14 19:22 ` Simon Tournier
2023-02-16 21:14 ` bug#61343: [PATCH] scripts: repl: Load (gnu packages) to set up %load-path Josselin Poiret via Bug reports for GNU Guix
2023-02-17 3:09 ` 宋文武 via Bug reports for GNU Guix
2023-02-17 14:56 ` bug#61574: [PATCH v2] scripts: repl: Extend REPL %load-path with all channels Simon Tournier
2023-02-27 14:01 ` bug#61343: " Ludovic Courtès
2023-03-02 13:44 ` bug#61574: " Andrew Tropin
2023-03-02 19:48 ` bug#61343: " Simon Tournier
2023-03-03 11:14 ` Ludovic Courtès
2023-02-17 15:21 ` bug#61343: [PATCH] scripts: repl: Load (gnu packages) to set up %load-path Simon Tournier
2024-03-03 5:54 ` bug#61343: bug#61574: bug#61343: bug#61574: [PATCH] scripts: repl: Extend REPL %load-path with all channels. For real Richard Sent
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).