GNU bug report logs -
#73299
[PATCH] build/go: Replace symlinks with a copy of the file.
Previous Next
Reported by: Efraim Flashner <efraim <at> flashner.co.il>
Date: Mon, 16 Sep 2024 15:41:02 UTC
Severity: normal
Tags: patch
Done: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #25 received at 73299 <at> debbugs.gnu.org (full text, mbox):
Hi Sharlatan,
Some small nitpicks below:
Sharlatan Hellseher <sharlatanus <at> gmail.com> writes:
> From: Efraim Flashner <efraim <at> flashner.co.il>
>
> * guix/build/go-build-system.scm (fix-embed-files): New procedure.
> (%standard-phases): Add 'fix-embed-files after 'unpack.
> * guix/build-system/go.scm (#:embed-files): New key parameter.
> * doc/guix.texi: (go-build-system): Document a new key.
>
> Co-authored-by: Sharlatan Hellseher <sharlatanus <at> gmail.com>
> Change-Id: I27bc46fa1a3f4675ff73b6cba4ef5c3d177c22b1
> ---
> doc/guix.texi | 8 ++++++++
> guix/build-system/go.scm | 6 ++++++
> guix/build/go-build-system.scm | 30 ++++++++++++++++++++++++++++--
> 3 files changed, 42 insertions(+), 2 deletions(-)
>
> diff --git a/doc/guix.texi b/doc/guix.texi
> index 4abe258af0..e780bde6cf 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -130,6 +130,9 @@
> Copyright @copyright{} 2024 Dariqq@*
> Copyright @copyright{} 2024 Denis 'GNUtoo' Carikli@*
> Copyright @copyright{} 2024 Fabio Natali@*
> +Copyright @copyright{} 2024 Troy Figiel@*
Is this accurate? Should another Co-authored-by: git trailer be added
for them?
[...]
[...]
> diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm
> index 3f0f5700a1..14cb5ae687 100644
> --- a/guix/build/go-build-system.scm
> +++ b/guix/build/go-build-system.scm
> @@ -4,10 +4,12 @@
> ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
> ;;; Copyright © 2020 Jack Hill <jackhill <at> jackhill.us>
> ;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
> -;;; Copyright © 2020, 2021, 2023 Efraim Flashner <efraim <at> flashner.co.il>
> +;;; Copyright © 2020, 2021, 2023, 2024 Efraim Flashner <efraim <at> flashner.co.il>
> ;;; Copyright © 2021 Sarah Morgensen <iskarian <at> mgsn.dev>
> ;;; Copyright © 2024 Ekaitz Zarraga <ekaitz <at> elenq.tech>
> ;;; Copyright © 2024 Picnoir <picnoir <at> alternativebit.fr>
> +;;; Copyright © 2024 Troy Figiel <troy <at> troyfigiel.com>
> +;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus <at> gmail.com>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -28,8 +30,9 @@ (define-module (guix build go-build-system)
> #:use-module ((guix build gnu-build-system) #:prefix gnu:)
> #:use-module (guix build union)
> #:use-module (guix build utils)
> - #:use-module (ice-9 match)
> + #:use-module (ice-9 format)
> #:use-module (ice-9 ftw)
> + #:use-module (ice-9 match)
> #:use-module (srfi srfi-1)
> #:use-module (rnrs io ports)
> #:use-module (rnrs bytevectors)
> @@ -201,6 +204,28 @@ (define* (setup-go-environment #:key inputs outputs goos goarch #:allow-other-ke
> (delete-file-recursively tmpdir))
> #t)
>
> +(define* (fix-embed-files #:key embed-files #:allow-other-keys)
> + "Golang can't determine the valid directory of the module of embed file
^ *an* embed file
or
embed fileS
I typically prefer 'cannot' vs can't and likewise for 'do not' vs
doesn't, etc., which I feel reads more "formal".
> +which is symlinked during setup environment phase, but easy resolved after
easy resolved -> easily resolved
> +coping file from the store to the build directory of the current package. Take
coping file -> copying the file; missing double space before 'Take'.
> +a list of files or regexps matching files from EMBED-FILES paramter, failover
paramter -> parameter
> +to 'editions_defaults.binpb' which is a part of <github.com/golang/protobuf>."
> + ;; see details in Golang source:
Please use fully punctuated sentences for standalone comments; e.g. :
"For the details, consult the Golang source:"
> + ;;
> + ;; - URL: <https://github.com/golang/go/blob/>
> + ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
> + ;; - file: src/cmd/go/internal/load/pkg.go#L2059
You could use github's raw URL for the file, which doesn't require any
javascript to be viewed.
That's it! Thank you for working on improving Go on Guix.
--
Maxim
This bug report was last modified 236 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.