GNU bug report logs - #67503
[PATCH 0/2] Improvements to the go importer

Previous Next

Package: guix-patches;

Reported by: Efraim Flashner <efraim <at> flashner.co.il>

Date: Tue, 28 Nov 2023 10:20:01 UTC

Severity: normal

Tags: patch

Full log


Message #17 received at 67503 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: 67503 <at> debbugs.gnu.org
Cc: Efraim Flashner <efraim <at> flashner.co.il>
Subject: [PATCH v2 1/2] guix: import: Don't include indirect dependencies in
 go.
Date: Thu,  7 Dec 2023 13:05:25 +0200
* guix/import/go.scm (parse-go.mod)[define-peg-patern require]: Adjust
the peg pattern to reject lines with the 'indirect' comment in them.

Change-Id: I9618bbaa1cb8c6549ced875e3c8d32afc72c3b9b
---
 guix/import/go.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/guix/import/go.scm b/guix/import/go.scm
index 0357e6a1eb..940cdac4b0 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2021 Xinglu Chen <public <at> yoctocell.xyz>
 ;;; Copyright © 2021 Sarah Morgensen <iskarian <at> mgsn.dev>
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune <at> gmail.com>
+;;; Copyright © 2023 Efraim Flashner <efraim <at> flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -293,7 +294,10 @@ (define (parse-go.mod content)
 
   ;; The following directives may all be used solo or in a block
   ;; RequireSpec = ModulePath Version newline .
-  (define-peg-pattern require all (and module-path version EOL))
+  (define-peg-pattern require all
+    (and module-path version
+         ;; We don't want the transitive dependencies.
+         (not-followed-by (and (* WS) "//" (* WS) "indirect")) EOL))
   (define-peg-pattern require-top body
     (and (ignore "require")
          (or (and block-start (* (or require block-line)) block-end) require)))
-- 
Efraim Flashner   <efraim <at> flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted





This bug report was last modified 186 days ago.

Previous Next


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