From unknown Fri Aug 15 15:34:34 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#50885 <50885@debbugs.gnu.org> To: bug#50885 <50885@debbugs.gnu.org> Subject: Status: [PATCH] import: go: Recognize major version suffixes. Reply-To: bug#50885 <50885@debbugs.gnu.org> Date: Fri, 15 Aug 2025 22:34:34 +0000 retitle 50885 [PATCH] import: go: Recognize major version suffixes. reassign 50885 guix-patches submitter 50885 Sarah Morgensen severity 50885 normal tag 50885 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 28 22:59:41 2021 Received: (at submit) by debbugs.gnu.org; 29 Sep 2021 02:59:41 +0000 Received: from localhost ([127.0.0.1]:47421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVPoq-0000V7-RZ for submit@debbugs.gnu.org; Tue, 28 Sep 2021 22:59:41 -0400 Received: from lists.gnu.org ([209.51.188.17]:50540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVPop-0000V0-6U for submit@debbugs.gnu.org; Tue, 28 Sep 2021 22:59:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVPoo-00076A-S4 for guix-patches@gnu.org; Tue, 28 Sep 2021 22:59:38 -0400 Received: from out2.migadu.com ([2001:41d0:2:aacc::]:60074) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVPom-0006gb-ST for guix-patches@gnu.org; Tue, 28 Sep 2021 22:59:38 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1632884374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=SwKrTP+s2M1J40z1LKwymzMrvBkV2DcLPAxt5kj7YrE=; b=L2Slh5rQhqWyYSDBbb0OyarQLN1SYc4WT8TxWSiE1Xrsi1zw9N5I3uY32eY0qWdZ4yrT7W x0pRtWV+NqpUJlOEXx+9L/9qULbVco1uLlsVmOh6PnCMdfHaN0cJMCu+/1KgNI/1SpPare 8ALsC9Gu6+5Gtr8ZAqYlziSE+YbhocM= From: Sarah Morgensen To: guix-patches@gnu.org Subject: [PATCH] import: go: Recognize major version suffixes. Date: Tue, 28 Sep 2021 19:59:32 -0700 Message-Id: <58c2e5ecbfef887de1414a4fed38634b0ed6c259.1632884296.git.iskarian@mgsn.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev Received-SPF: pass client-ip=2001:41d0:2:aacc::; envelope-from=iskarian@mgsn.dev; helo=out2.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Do not treat major version suffixes (such as "/v3") as repository subdirectories. See . * guix/import/go.scm (go-module->guix-package): When determining the unpack path, compare 'root-module-path' to 'module-path-sans-suffix' instead of 'module-path'. --- guix/import/go.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guix/import/go.scm b/guix/import/go.scm index ca909ab35a..26dbc34b63 100644 --- a/guix/import/go.scm +++ b/guix/import/go.scm @@ -612,6 +612,8 @@ hint: use one of the following available versions ~a\n" (dependencies (if pin-versions? dependencies+versions (map car dependencies+versions))) + (module-path-sans-suffix + (match:prefix (string-match "([\\./]v[0-9]+)?$" module-path))) (guix-name (go-module->guix-package-name module-path)) (root-module-path (module-path->repository-root module-path)) ;; The VCS type and URL are not included in goproxy information. For @@ -631,7 +633,7 @@ hint: use one of the following available versions ~a\n" (build-system go-build-system) (arguments '(#:import-path ,module-path - ,@(if (string=? module-path root-module-path) + ,@(if (string=? module-path-sans-suffix root-module-path) '() `(#:unpack-path ,root-module-path)))) ,@(maybe-propagated-inputs base-commit: c582be4c38596a6a31a39c6799723dcd8b6eb909 prerequisite-patch-id: dbb8a05982f57aefffd5b97ab3dac4073b48245d -- 2.33.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 04 10:08:45 2021 Received: (at 50885-done) by debbugs.gnu.org; 4 Oct 2021 14:08:45 +0000 Received: from localhost ([127.0.0.1]:37985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXOe5-0004zE-AZ for submit@debbugs.gnu.org; Mon, 04 Oct 2021 10:08:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXOe3-0004yw-3Z for 50885-done@debbugs.gnu.org; Mon, 04 Oct 2021 10:08:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55200) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXOdx-0007k8-VY; Mon, 04 Oct 2021 10:08:37 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=60560 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXOdr-0003MZ-Q0; Mon, 04 Oct 2021 10:08:32 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Sarah Morgensen Subject: Re: bug#50885: [PATCH] import: go: Recognize major version suffixes. References: <58c2e5ecbfef887de1414a4fed38634b0ed6c259.1632884296.git.iskarian@mgsn.dev> Date: Mon, 04 Oct 2021 16:08:29 +0200 In-Reply-To: <58c2e5ecbfef887de1414a4fed38634b0ed6c259.1632884296.git.iskarian@mgsn.dev> (Sarah Morgensen's message of "Tue, 28 Sep 2021 19:59:32 -0700") Message-ID: <87zgroopb6.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.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: 50885-done Cc: 50885-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Sarah Morgensen skribis: > Do not treat major version suffixes (such as "/v3") as repository > subdirectories. See . > > * guix/import/go.scm (go-module->guix-package): When determining the > unpack path, compare 'root-module-path' to 'module-path-sans-suffix' > instead of 'module-path'. Applied as well, but I feel that it may be useful to have tests for these fine points that where regressions would otherwise be hard to notice. Thanks, Ludo=E2=80=99. From unknown Fri Aug 15 15:34:34 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 02 Nov 2021 11:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator