all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: 67503@debbugs.gnu.org
Cc: Efraim Flashner <efraim@flashner.co.il>,
	Katherine Cox-Buday <cox.katherine.e+guix@gmail.com>
Subject: [bug#67503] [PATCH 1/2] guix: import: Don't include indirect dependencies in go.
Date: Tue, 28 Nov 2023 12:21:06 +0200	[thread overview]
Message-ID: <6314f6d57fcfd7f449af3b4b6ad7c425fd14936a.1701166089.git.efraim@flashner.co.il> (raw)
In-Reply-To: <cover.1701166089.git.efraim@flashner.co.il>

* 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@yoctocell.xyz>
 ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2023 Efraim Flashner <efraim@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@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





  reply	other threads:[~2023-11-28 10:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-28 10:18 [bug#67503] [PATCH 0/2] Improvements to the go importer Efraim Flashner
2023-11-28 10:21 ` Efraim Flashner [this message]
2023-11-28 10:21 ` [bug#67503] [PATCH 2/2] guix: import: Report go version for " Efraim Flashner
2024-10-31 13:39 ` [bug#67503] Improvements to the go importer (bumping) Steve George

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=6314f6d57fcfd7f449af3b4b6ad7c425fd14936a.1701166089.git.efraim@flashner.co.il \
    --to=efraim@flashner.co.il \
    --cc=67503@debbugs.gnu.org \
    --cc=cox.katherine.e+guix@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.