all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Sent <richard@freakingpenguin.com>
To: 61343@debbugs.gnu.org
Cc: dev@jpoiret.xyz, zimon.toutoune@gmail.com
Subject: bug#61343: bug#61574: bug#61343: bug#61574: [PATCH] scripts: repl: Extend REPL %load-path with all channels. For real.
Date: Sun, 03 Mar 2024 00:54:25 -0500	[thread overview]
Message-ID: <87cysbc12m.fsf@freakingpenguin.com> (raw)
In-Reply-To: <87k00tlul8.fsf@envs.net>

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.




      parent reply	other threads:[~2024-03-03  5:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Richard Sent [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cysbc12m.fsf@freakingpenguin.com \
    --to=richard@freakingpenguin.com \
    --cc=61343@debbugs.gnu.org \
    --cc=dev@jpoiret.xyz \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.