From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id MPqMIMz9AGTihwAAbAwnHQ (envelope-from ) for ; Thu, 02 Mar 2023 20:49:32 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id AGvAH8z9AGT7NQEAG6o9tA (envelope-from ) for ; Thu, 02 Mar 2023 20:49:32 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D57463CBC4 for ; Thu, 2 Mar 2023 20:49:31 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=ZdeIDoWk; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677786572; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=VwydRvwNdZdVwsY4EDs916+vpANewIq2LWoJoBiuORQ=; b=kDJWvjHdPsDD+ZMu67fjI4qRUeBrLpnsxgekyP9dxgQLT2yl+DKmFLkCnXiVhs4YP/jWmG zVdqf7nVJ0mSjiYcJgU5XNYtzkL360YiN27CaZ6MQNHztttOO4oqzVP2B4XFQ5Sw5W5Yl6 PG0UbVddBPs2Kf2sb1uS5goV8uZv+UiJmW3katc85EsQVMPsmCZIrh6f8wXdIOUHa42xOB j04z9yc/95KH5+V7wCT4RNn5AL6qpUvCsyKoDtD49E5X3DjB4nHZ2JAWpouGpTCMnyF8bu akespnQ4R78BI7k9JnWB+VBAHlZpUwlE5jwAQDtyIO6hlsxoyBfg6sYspNvniw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=ZdeIDoWk; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677786572; a=rsa-sha256; cv=none; b=o1ZL6f6s66AmhRZXr0TUCBY786kVDXdtJ1v2gl+6pw2AquOzuIn2QxkWgoYEkWvGaGTb5R OxvkXsHTzsHYnxhI12pku6p4jSu9+d+f0cAJ61botMb2oNp8hVqJCkGEcbX0uDJg4RJarb YCOqGiXnegIHrhPU160H3RVP0qODbzSErPP35Izm5cHqE0ATcdPqqyZPX/AutFQkJp5lYB V3BY9xKDKM6AgvbMeFK9O8yReqUAadc15c09kpcgQGFTEdvKM3nyNq8RMzVoOEL9LQ8fYC VmAvYLQYn3OSacJVTeGhNkWxVXbkwOfs2vhGKCXWR0Bs6vDSFs1UHuDLlHnSoQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXovI-0005NN-0U; Thu, 02 Mar 2023 14:49:04 -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 ) id 1pXovG-0005LI-UH for bug-guix@gnu.org; Thu, 02 Mar 2023 14:49:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pXovG-0005Zn-M5 for bug-guix@gnu.org; Thu, 02 Mar 2023 14:49:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pXovG-0005Y4-BW for bug-guix@gnu.org; Thu, 02 Mar 2023 14:49:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#61343: bug#61574: bug#61343: bug#61574: [PATCH v2] scripts: repl: Extend REPL %load-path with all channels. Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 02 Mar 2023 19:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61343 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: Andrew Tropin , Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 61574@debbugs.gnu.org, Josselin Poiret , 61343@debbugs.gnu.org, iyzsong@envs.net Received: via spool by 61343-submit@debbugs.gnu.org id=B61343.167778650321234 (code B ref 61343); Thu, 02 Mar 2023 19:49:02 +0000 Received: (at 61343) by debbugs.gnu.org; 2 Mar 2023 19:48:23 +0000 Received: from localhost ([127.0.0.1]:58426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXouc-0005WG-Qp for submit@debbugs.gnu.org; Thu, 02 Mar 2023 14:48:23 -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 ) 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 In-Reply-To: <87o7pbs1xn.fsf@trop.in> References: <20230217145627.85062-1-zimon.toutoune@gmail.com> <87sferky1k.fsf@gnu.org> <87o7pbs1xn.fsf@trop.in> Date: Thu, 02 Mar 2023 20:48:07 +0100 Message-ID: <87cz5rdjew.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: X-Migadu-Spam-Score: -3.10 X-Spam-Score: -3.10 X-Migadu-Scanner: scn0.migadu.com X-Migadu-Queue-Id: D57463CBC4 List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: l66KJXfm9wQT Hi, I reopen the bug. On jeu., 02 mars 2023 at 17:44, Andrew Tropin 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: Cheers, simon