[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#73299] [PATCH v2 1/3] build/go: Replace symlinks with a copy of the
From: |
Maxim Cournoyer |
Subject: |
[bug#73299] [PATCH v2 1/3] build/go: Replace symlinks with a copy of the file. |
Date: |
Thu, 26 Sep 2024 22:22:23 +0900 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hi Sharlatan,
Some small nitpicks below:
Sharlatan Hellseher <sharlatanus@gmail.com> writes:
> From: Efraim Flashner <efraim@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@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@gmail.com>
> ;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us>
> ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
> -;;; Copyright © 2020, 2021, 2023 Efraim Flashner <efraim@flashner.co.il>
> +;;; Copyright © 2020, 2021, 2023, 2024 Efraim Flashner
> <efraim@flashner.co.il>
> ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
> ;;; Copyright © 2024 Ekaitz Zarraga <ekaitz@elenq.tech>
> ;;; Copyright © 2024 Picnoir <picnoir@alternativebit.fr>
> +;;; Copyright © 2024 Troy Figiel <troy@troyfigiel.com>
> +;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus@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