GNU bug report logs - #61574
[PATCH v2] scripts: repl: Extend REPL %load-path with all channels.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Simon Tournier <zimon.toutoune@HIDDEN>; merged with #61343; dated Fri, 17 Feb 2023 14:57:01 UTC; Maintainer for guix is bug-guix@HIDDEN.
Removed tag(s) patch. Request was from Simon Tournier <zimon.toutoune@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.

Message received at 61574 <at> debbugs.gnu.org:


Received: (at 61574) by debbugs.gnu.org; 2 Mar 2023 19:48:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 02 14:48:22 2023
Received: from localhost ([127.0.0.1]:58424 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pXouc-0005WB-6q
	for submit <at> debbugs.gnu.org; Thu, 02 Mar 2023 14:48:22 -0500
Received: from mail-wr1-f49.google.com ([209.85.221.49]:38481)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>)
 id 1pXouZ-0005Ug-3Y; Thu, 02 Mar 2023 14:48:19 -0500
Received: by mail-wr1-f49.google.com with SMTP id h11so233579wrm.5;
 Thu, 02 Mar 2023 11:48:19 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20210112; t=1677786493;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id
 :reply-to; bh=VwydRvwNdZdVwsY4EDs916+vpANewIq2LWoJoBiuORQ=;
 b=ZdeIDoWkuq8McnVeOkeGr4VBp8fl71CaI4QSlSEcL3i0L2Q77f0p2aYJsD93E/2wia
 iN2MWuTxzCGJG/3Hh7zvtq8Di5hcTpr360xwN0ml+o2aIQC9kfrUmsCDScrVo+iyRnYu
 8MGfc0xS9etJrS3HdEnJD30etbeSUXrGugB2m0wvocmAG/nkmk46P49+Vojj/a1cpasO
 Pfx4ahjzDDLoezh6kAnYHDzWL4z9lRBgCquevFgWXdI6OI+1ZlmCRrGfuRXHHNtbxJAN
 cYkzs3hXDRFvb541/zwp4siiOqcA6iUsX0Nf1h391DNjeSHJL81MIblssjIT7gelCIIJ
 8R9A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112; t=1677786493;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=VwydRvwNdZdVwsY4EDs916+vpANewIq2LWoJoBiuORQ=;
 b=iuutFwuUHJTLl22Z05oRAvpNhZopFqk+QARbGgXFNbKhXBQ1r6/PnvwnwBQmOVzg8P
 FxPtD7/O6NcSCXxElCrD7BfNo1NVtK1GuMlGU0XK/hs5oHffRBA+dyYb0CTq8yVoQkZU
 ymEQfqX7Ov6syWXocY3fyy+hyPFK5d3QEhZES98/7osorEyEUrxjsWmY+JVeH/Gqvbrp
 j0ZaG4EMFsLKoAhyIizpDrpZzAgE1H8TQLJnQdvohwpJRfS0MunEKSN/bGcpLKI9fw3e
 iiqOrc4EIC1Lp/ZsRs105T79d2xuYBeO+Maln/q3bdpEX0Dm6+rnRda0bqQHdWTLhHmJ
 MrWg==
X-Gm-Message-State: AO0yUKUBQR7dYuHvbhASCzsONJWLUDiKqJ3w11aRL2eUSXSPlNAN5QT8
 0LdyK8YIRd7D2q4FAHPGE0kra7kakbM=
X-Google-Smtp-Source: AK7set/gS3qsR4Ubelc6rYxbG9hAXz2B8ObQ96Uybw9qnJsc0VsSSNxk1OTM/knnJjS0O2WozvqMFg==
X-Received: by 2002:adf:f285:0:b0:2c7:1c4e:1d16 with SMTP id
 k5-20020adff285000000b002c71c4e1d16mr6503716wro.0.1677786493276; 
 Thu, 02 Mar 2023 11:48:13 -0800 (PST)
Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id
 j17-20020adff011000000b002c5a1bd527dsm198419wro.96.2023.03.02.11.48.12
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 02 Mar 2023 11:48:13 -0800 (PST)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: Andrew Tropin <andrew@HIDDEN>, Ludovic =?utf-8?Q?Court=C3=A8s?=
 <ludo@HIDDEN>
Subject: Re: bug#61574: bug#61343: bug#61574: [PATCH v2] scripts: repl:
 Extend REPL %load-path with all channels.
In-Reply-To: <87o7pbs1xn.fsf@HIDDEN>
References: <e0ffbcbb07fe41a04688223342461aa4d3310142.1676582046.git.dev@HIDDEN>
 <20230217145627.85062-1-zimon.toutoune@HIDDEN> <87sferky1k.fsf@HIDDEN>
 <87o7pbs1xn.fsf@HIDDEN>
Date: Thu, 02 Mar 2023 20:48:07 +0100
Message-ID: <87cz5rdjew.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61574
Cc: 61574 <at> debbugs.gnu.org, Josselin Poiret <dev@HIDDEN>,
 61343 <at> debbugs.gnu.org, iyzsong@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi,

I reopen the bug.

On jeu., 02 mars 2023 at 17:44, Andrew Tropin <andrew@HIDDEN> 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 =E2=80=99guix repl -q=E2=80=99 for avoiding spurious =
~/.guile
configuration and I remember running =E2=80=9C./pre-inst-env guix pull -p
/tmp/new=E2=80=9D and checking.  Hum?!  Anyway!

My apologies.

Back to the issue:

   1. The patch does not tweak =E2=80=99guix repl script.scm=E2=80=99 but o=
nly the
      interactive part =E2=80=93 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)
=20
          (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 explain=
ed 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 =E2=80=99pk=E2=80=99 around but I oft=
en get error
when =E2=80=9CComputing Guix derivation=E2=80=9D.  Well, the test-error is =
a long
process here. :-)

As discussed in #42688 [1], instead of
1b179d7876f19f04009a2f9e248ac10711f4c660, the plain call to
(%package-module-path) =E2=80=93 instead of (current-profile) =E2=80=93 fix=
es 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)
=20
          (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 explain=
ed 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




Information forwarded to bug-guix@HIDDEN:
bug#61574; Package guix. Full text available.

Message received at 61574-done <at> debbugs.gnu.org:


Received: (at 61574-done) by debbugs.gnu.org; 2 Mar 2023 13:44:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 02 08:44:34 2023
Received: from localhost ([127.0.0.1]:56186 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pXjEY-0004pC-89
	for submit <at> debbugs.gnu.org; Thu, 02 Mar 2023 08:44:34 -0500
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:42277)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>)
 id 1pXjEV-0004op-OR; Thu, 02 Mar 2023 08:44:32 -0500
Received: (Authenticated sender: andrew@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 55CA71C000E;
 Thu,  2 Mar 2023 13:44:23 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1;
 t=1677764665;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=eQDEKj0XDCsQW27lgqajcBlenTh37+6/ngHC2lWLLRI=;
 b=fG8GmOtrqWkIIi3HOk/o3Lh+tqfILt8VMWjzjJ3AHxQVdyxdzwpaOGMU2atv25yCFI4npb
 uuB3q02kSm6tf+147gYWkFF3A4n6nvszkpYl9xMOf0OqMPqe4PiuF6aZ3EOgGtQ3fF79Y5
 1B8dTFyjnVe0ogcuiBzUOQNe+Es5kD2fWQXystsMbJU1VXQnuVDmOk+AugnfwnordyjX1S
 LpQ2G2xFrNDOC65kd+M/m75jz9sqbrxwkpWgRK3Vbwr/w78CGlrSAF6D40Fpk3w8hVUKLS
 KdtwGEwiIUbr4RjIW8PkoGkDTM0MeJamHfnDmSvWhMXGG7W9/NdRqzUzadACuw==
From: Andrew Tropin <andrew@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Simon Tournier
 <zimon.toutoune@HIDDEN>
Subject: Re: bug#61343: bug#61574: [PATCH v2] scripts: repl: Extend REPL
 %load-path with all channels.
In-Reply-To: <87sferky1k.fsf@HIDDEN>
References: <e0ffbcbb07fe41a04688223342461aa4d3310142.1676582046.git.dev@HIDDEN>
 <20230217145627.85062-1-zimon.toutoune@HIDDEN> <87sferky1k.fsf@HIDDEN>
Date: Thu, 02 Mar 2023 17:44:20 +0400
Message-ID: <87o7pbs1xn.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 61574-done
Cc: Josselin Poiret <dev@HIDDEN>, 61343-done <at> debbugs.gnu.org,
 61574-done <at> debbugs.gnu.org, iyzsong@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 2023-02-27 15:01, Ludovic Court=C3=A8s wrote:

> Hi Simon,
>
> Simon Tournier <zimon.toutoune@HIDDEN> skribis:
>
>> Fixes <https://bugs.gnu.org/61343>.
>> Reported by =E5=AE=8B=E6=96=87=E6=AD=A6 <iyzsong@HIDDEN>.
>>
>> * 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 expl=
ained 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.

=2D-=20
Best regards,
Andrew Tropin

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmQAqDQACgkQIgjSCVjB
3rDE6A//axSFCBoXmlCd7bxMl8moMOE19oPSgDYEJ7Ms5NuGSwpSuVctJHJy5Xf4
L7gdFMv5LZ8My8lJ3CsaYkpOXU1pl1wSqAp1zm+b5i7ORffqx/QBEknJeRBFv9d/
nElIWkIlgkg1d0CDs34afomcVy85CCpZ0IXq82aiTi3WXRwlftqevClxPScws8/P
/B/HCPe45TCxgkFycdJDckM2WhOHvhCp8oZZmZa5jDzOmamr9vj/ZXA/oySueC3u
fuLfaHKReT9+r4al92KGGjow0ezHZVzxV27ZHIRQD2ZUAomvlwV/yL1BNg590MIM
p/6i/wGvLMlUbugFyJuHU0Xu/ge71JxCsm3kV2qBGzBFJAeaj+/Z47frLsyxWQTx
+cILD5AHwtTXyFoOGK+F9gLeCU8FNEQRBtlbgfLMjkin7aQBUPFDGOgMpXGAVpfI
PYprUfVTyrE49uv68z58DXocnQsJ2Sx5BrSbxMtcXizbx2XBsX9Cr+1KNMZ5jLHy
VWUHJHJETDrOvdQOhHumPVF8EWZ0SnMXtxgeMUaDmQQriHQuhvAxNWhUkHOlHOOl
vLXQVPs+wS7GEZhP3eJX3DUrvvUkeTVtsnswDQUS2wX6rs/ujKaSDhK9c0nCcRkt
hbO8STr6XgKrPxeoRjtMohp198MBsW0aFcLpjhUreswSD3W8z5U=
=BP2f
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-guix@HIDDEN:
bug#61574; Package guix. Full text available.

Message received at 61574-done <at> debbugs.gnu.org:


Received: (at 61574-done) by debbugs.gnu.org; 27 Feb 2023 14:01:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 27 09:01:39 2023
Received: from localhost ([127.0.0.1]:46410 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pWe4R-0001Z1-Ap
	for submit <at> debbugs.gnu.org; Mon, 27 Feb 2023 09:01:39 -0500
Received: from eggs.gnu.org ([209.51.188.92]:38130)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>)
 id 1pWe4O-0001Yg-PB; Mon, 27 Feb 2023 09:01:38 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1pWe4H-0007aw-Ku; Mon, 27 Feb 2023 09:01:29 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=N8s40hS3Lzdbj1msrtIiAa2Gmd8bNWUz+3rWGH3Ko3Q=; b=D59OxAfLOaLivHy4mH61
 VIKFET5nQ/YtaB6u8IKuojdogFw9FW2bsnLfcsFsrdruB0MBxyGB2DxFxmFFq14BwaWNjZoKHkbc7
 0sdTjpYa1SmIsMk7GHyCKBRPxz+wGxDEMsskedbTzILa7vp0WGRsssKkUR5EsSIGjC0unynNYs+tW
 /NJ2qutXQ45HCGDw+gcQLRwztNhMlzlCwbJH6Gk8mE5r1vY/dK5NkNkrI8jv2MCKF72MfXCo1Zut+
 cPgwglBJRzXvK4aP/DUonmRU2fYl4qmkfypQqRLYemvCmg5Paf7cyUKXS3YMBKWYhTRLXhqh6Z3Gh
 e1Mhqp2nRaFNPw==;
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1pWe41-0002n1-KD; Mon, 27 Feb 2023 09:01:27 -0500
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Simon Tournier <zimon.toutoune@HIDDEN>
Subject: Re: bug#61574: [PATCH v2] scripts: repl: Extend REPL %load-path
 with all channels.
References: <e0ffbcbb07fe41a04688223342461aa4d3310142.1676582046.git.dev@HIDDEN>
 <20230217145627.85062-1-zimon.toutoune@HIDDEN>
Date: Mon, 27 Feb 2023 15:01:11 +0100
In-Reply-To: <20230217145627.85062-1-zimon.toutoune@HIDDEN> (Simon
 Tournier's message of "Fri, 17 Feb 2023 15:56:27 +0100")
Message-ID: <87sferky1k.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 61574-done
Cc: Josselin Poiret <dev@HIDDEN>, 61574-done <at> debbugs.gnu.org,
 61343-done <at> debbugs.gnu.org, iyzsong@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi Simon,

Simon Tournier <zimon.toutoune@HIDDEN> skribis:

> Fixes <https://bugs.gnu.org/61343>.
> Reported by =E5=AE=8B=E6=96=87=E6=AD=A6 <iyzsong@HIDDEN>.
>
> * 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 expla=
ined above.

I tweaked the comment :-) and applied.

Thanks!

Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#61574; Package guix. Full text available.
Merged 61343 61574. Request was from Simon Tournier <zimon.toutoune@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 17 Feb 2023 14:56:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 17 09:56:37 2023
Received: from localhost ([127.0.0.1]:40981 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pT2A8-0007xU-MP
	for submit <at> debbugs.gnu.org; Fri, 17 Feb 2023 09:56:37 -0500
Received: from lists.gnu.org ([209.51.188.17]:46492)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1pT2A7-0007xO-Na
 for submit <at> debbugs.gnu.org; Fri, 17 Feb 2023 09:56:36 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <zimon.toutoune@HIDDEN>)
 id 1pT2A7-0006UD-Ay
 for bug-guix@HIDDEN; Fri, 17 Feb 2023 09:56:35 -0500
Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <zimon.toutoune@HIDDEN>)
 id 1pT2A5-0002wE-FZ
 for bug-guix@HIDDEN; Fri, 17 Feb 2023 09:56:35 -0500
Received: by mail-wr1-x42c.google.com with SMTP id r25so2332303wrr.5
 for <bug-guix@HIDDEN>; Fri, 17 Feb 2023 06:56:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20210112; t=1676645791;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=A2LCfKH/5SaXcgXYU5U98B32MLZGfXffUG43avL/JL0=;
 b=WF3Abz6tSwAF5kOefetkQqeil88+496hj3lnvkgDURqoVSOO6lVI7ofG8i7KBGgE2q
 vpzeyausQYiMOs92FCyfxDxpcjhPrzZvAHzrnsXewLJquPLv6P30FOY84V+MZ2RaKRPp
 020ZZsH/5I3Wmyw2ms1Eh6wJ9fw5jjrIPjPrBMtEs/JdftKxyS6c/oC5Ou5MvjfHXiL9
 h7Uk4ZTXSpZIwQ4AaBYGBXEG/q4dj4kkCGvwl1zV0rFl0QDFxi6y3kkvMMlLGpTvPnyq
 gxIwKZkSQKMo2zn6uwrNftezoxZ+c/T5nX2lexXOuYNv9qd8pfNAFHtBa1RvvqrU6DHt
 gBHQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112; t=1676645791;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=A2LCfKH/5SaXcgXYU5U98B32MLZGfXffUG43avL/JL0=;
 b=PHq+r7vLG2qxV9mPxlX7wBUJ+1WsXqOeSTWrRd+/rlv2dQE2+jL4D0NstpBTjKcDa8
 P9DSoPBC3UmvOAJ4vJCpjEGvwuu0GtFlvIe5Dv/g6KTODeIFkMbvStsCVZIR4+Qmm46r
 4Huitpo5rH8XdL19FJwx1JOm82qWlXBLeZNAtHJMprV4ThdbE8dS/NF7sVYkxmj9ItsX
 tf8lQjGMx+L84olD+q4xsNXyyam2SDo8QDl9Mf6YViQBlGKorRv95UVQ8PuyWdygY/ja
 SF5UzGL+RoHxNyg/guqh165KTQ6cr1BGQJtmUCbHPixe61zpyfU5X2zAM864hjhca9GB
 7t5Q==
X-Gm-Message-State: AO0yUKWQJT4G16CeUib7kPQ9URfEWv14uuLNaKrUGE81ViES7z8gHWms
 zznlQNCdBReMwPcIW/VPK5kzkaUwVII=
X-Google-Smtp-Source: AK7set+c5uR0SkGEEZxF3SM9DCrRqp6s1Ctsk1v5+CGFqUy2KgO5msr7SSEyr2a8bFSaNmwKw6Hhng==
X-Received: by 2002:a5d:504c:0:b0:2c5:5e37:653a with SMTP id
 h12-20020a5d504c000000b002c55e37653amr810258wrt.7.1676645790705; 
 Fri, 17 Feb 2023 06:56:30 -0800 (PST)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 j2-20020adfea42000000b002c5804b6afasm4495839wrn.67.2023.02.17.06.56.30
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 17 Feb 2023 06:56:30 -0800 (PST)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: Josselin Poiret via Bug reports for GNU Guix <bug-guix@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>,
 =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@HIDDEN>,
 61343 <at> debbugs.gnu.org
Subject: [PATCH v2] scripts: repl: Extend REPL %load-path with all channels.
Date: Fri, 17 Feb 2023 15:56:27 +0100
Message-Id: <20230217145627.85062-1-zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.38.1
In-Reply-To: <e0ffbcbb07fe41a04688223342461aa4d3310142.1676582046.git.dev@HIDDEN>
References: <e0ffbcbb07fe41a04688223342461aa4d3310142.1676582046.git.dev@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=2a00:1450:4864:20::42c;
 envelope-from=zimon.toutoune@HIDDEN; helo=mail-wr1-x42c.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: Josselin Poiret <dev@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Fixes <https://bugs.gnu.org/61343>.
Reported by 宋文武 <iyzsong@HIDDEN>.

* 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





Acknowledgement sent to Simon Tournier <zimon.toutoune@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#61574; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 2 Mar 2023 20:00:02 UTC

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