unofficial mirror of guix-patches@gnu.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 v2 1/2] guix: import: Don't include indirect dependencies in go.
Date: Thu,  7 Dec 2023 13:05:25 +0200	[thread overview]
Message-ID: <4231413995e058728e28814773ffc7e3c63d5104.1701412758.git.efraim@flashner.co.il> (raw)
In-Reply-To: <cover.1701412758.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-12-07 11:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1701412758.git.efraim@flashner.co.il>
2023-12-07 11:05 ` Efraim Flashner [this message]
2023-12-07 11:05 ` [bug#67503] [PATCH v2 2/2] guix: import: Report go version for go importer Efraim Flashner

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4231413995e058728e28814773ffc7e3c63d5104.1701412758.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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).