[PATCH] Added Go 1.16.2

  • Done
  • quality assurance status badge
Details
4 participants
  • Sarah Morgensen
  • Maxim Cournoyer
  • Maxime Devos
  • Néfix Estrada
Owner
unassigned
Submitted by
Néfix Estrada
Severity
normal
N
N
Néfix Estrada wrote on 27 Mar 2021 17:29
(address . guix-patches@gnu.org)(name . Néfix Estrada)(address . nefixestrada@gmail.com)
20210327162953.32278-1-nefixestrada@gmail.com
Signed-off-by: Néfix Estrada <nefixestrada@gmail.com>
---
gnu/packages/golang.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (47 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index d9988cd7ad..df17955c93 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -25,6 +25,7 @@
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2021 Néfix Estrada <nefixestrada@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -440,6 +441,32 @@ in the style of communicating sequential processes (@dfn{CSP}).")
,@(package-native-inputs go-1.4)))
(supported-systems %supported-systems)))
+(define-public go-1.16
+ (package
+ (inherit go-1.14)
+ (name "go")
+ (version "1.16.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/golang/go")
+ (commit (string-append "go" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1cvw81hgb7akqp53lqbgpk303km8a7xs7lcr8c8z30hr5ql2kz90"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments go-1.14)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'prebuild 'prebuild-1-16
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib")))
+ (substitute* "cmd/go/testdata/script/link_syso_issue33139.txt"
+ (("\\[\\!cgo\\] skip")
+ "[!exec:cc] skip")))))))))))
+
(define-public go go-1.14)
(define-public go-github-com-alsm-ioprogress
--
2.31.0
M
M
Maxime Devos wrote on 27 Mar 2021 20:56
cf91e6e3120d04769ee9b890f6f9a6fecaf057c9.camel@telenet.be
On Sat, 2021-03-27 at 17:29 +0100, Néfix Estrada wrote:
Toggle quote (5 lines)
> Signed-off-by: Néfix Estrada <nefixestrada@gmail.com>
> ---
> gnu/packages/golang.scm | 27 +++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)

A commit message is missing, see ‘16.6 Submitting Patches’ in
the manual (and there are plenty of examples in "git log").

There have been a few patches lately by new
contributers without commit messages; is this section of the
manual hard to find? Is there some location where we could
prominently feature a link to the section?

Also, ‘we’ don't use ‘Signed-off-by’ like that. From ‘16.8 Commit Access’:

When pushing a commit on behalf of somebody else, please add a
‘Signed-off-by’ line at the end of the commit log message—e.g., with
‘git am --signoff’. This improves tracking of who did what.

Thus, it is up to committers to add a line like that. Perhaps a system
like the Linux kernel project uses could be useful in the future,
but I don't think ‘we’ are at that point yet

Toggle quote (26 lines)
> diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
> index d9988cd7ad..df17955c93 100644
> --- a/gnu/packages/golang.scm
> +++ b/gnu/packages/golang.scm
> @@ -25,6 +25,7 @@
> ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
> ;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net>
> ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
> +;;; Copyright © 2021 Néfix Estrada <nefixestrada@gmail.com>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -440,6 +441,32 @@ in the style of communicating sequential processes (@dfn{CSP}).")
> ,@(package-native-inputs go-1.4)))
> (supported-systems %supported-systems)))
>
> +(define-public go-1.16
> + (package
> + (inherit go-1.14)
> + [...]

> + (arguments
> + (substitute-keyword-arguments (package-arguments go-1.14)
> + ((#:phases phases)
> + `(modify-phases ,phases

This part looks good to me.

Toggle quote (8 lines)
> + (add-after 'prebuild 'prebuild-1-16
> + (lambda* (#:key inputs #:allow-other-keys)
> + (let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib")))
> + (substitute* "cmd/go/testdata/script/link_syso_issue33139.txt"
> + (("\\[\\!cgo\\] skip")
> + "[!exec:cc] skip")))))))))))
> +

What's this 'prebuild-1-16' phase for? Please add a comment explaining!
And what's (let* ((gcclib ...) ...) doing there if gcclib isn't used afterwards?

Toggle quote (2 lines)
> (define-public go go-1.14)

Something to consider for people who know the go situation in guix:
could this be replaced with (define-public go go-1.16) after this patch?
(And go-1.14 deleted as there are no uses of it anymore.)
The output of "guix refresh --list-dependent go" is:

Building the following 125 packages would ensure 440 dependent packages are rebuilt:
[...]

so this shouldn't cause a world-rebuild (note go packages are (reportedly)
cheap to build). But perhaps there are API incompatibilities between 1.16 and
1.14? idk.

Note: this patch should be reviewed by someone more knowledged about go
in guix than me.

Thanks for looking into this,
Greetings,
Maxime
-----BEGIN PGP SIGNATURE-----

iI0EABYIADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYF+N1xccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7g+wAQDIuumSyfD/ULQ6MOVcveXlQVhm
dfdAg9AWgUPK6DMA7QD/dAWawD4s1WIrRlbWUv7OI0SMaSR4qdI7KJoMcTQbIww=
=k3hI
-----END PGP SIGNATURE-----


M
M
Maxim Cournoyer wrote on 29 Mar 2021 02:46
Re: bug#47434: [PATCH] Added Go 1.16.2
(name . Maxime Devos)(address . maximedevos@telenet.be)
874kgudbwm.fsf_-_@gmail.com
Hi,

Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (77 lines)
> On Sat, 2021-03-27 at 17:29 +0100, Néfix Estrada wrote:
>> Signed-off-by: Néfix Estrada <nefixestrada@gmail.com>
>> ---
>> gnu/packages/golang.scm | 27 +++++++++++++++++++++++++++
>> 1 file changed, 27 insertions(+)
>
> A commit message is missing, see ‘16.6 Submitting Patches’ in
> the manual (and there are plenty of examples in "git log").
>
> There have been a few patches lately by new
> contributers without commit messages; is this section of the
> manual hard to find? Is there some location where we could
> prominently feature a link to the section?
>
> Also, ‘we’ don't use ‘Signed-off-by’ like that. From ‘16.8 Commit Access’:
>
> When pushing a commit on behalf of somebody else, please add a
> ‘Signed-off-by’ line at the end of the commit log message—e.g., with
> ‘git am --signoff’. This improves tracking of who did what.
>
> Thus, it is up to committers to add a line like that. Perhaps a system
> like the Linux kernel project uses could be useful in the future,
> but I don't think ‘we’ are at that point yet
>
>> diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
>> index d9988cd7ad..df17955c93 100644
>> --- a/gnu/packages/golang.scm
>> +++ b/gnu/packages/golang.scm
>> @@ -25,6 +25,7 @@
>> ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
>> ;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net>
>> ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
>> +;;; Copyright © 2021 Néfix Estrada <nefixestrada@gmail.com>
>> ;;;
>> ;;; This file is part of GNU Guix.
>> ;;;
>> @@ -440,6 +441,32 @@ in the style of communicating sequential processes (@dfn{CSP}).")
>> ,@(package-native-inputs go-1.4)))
>> (supported-systems %supported-systems)))
>>
>> +(define-public go-1.16
>> + (package
>> + (inherit go-1.14)
>> + [...]
>
>> + (arguments
>> + (substitute-keyword-arguments (package-arguments go-1.14)
>> + ((#:phases phases)
>> + `(modify-phases ,phases
>
> This part looks good to me.
>
>> + (add-after 'prebuild 'prebuild-1-16
>> + (lambda* (#:key inputs #:allow-other-keys)
>> + (let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib")))
>> + (substitute* "cmd/go/testdata/script/link_syso_issue33139.txt"
>> + (("\\[\\!cgo\\] skip")
>> + "[!exec:cc] skip")))))))))))
>> +
>
> What's this 'prebuild-1-16' phase for? Please add a comment explaining!
> And what's (let* ((gcclib ...) ...) doing there if gcclib isn't used afterwards?
>
>> (define-public go go-1.14)
>
> Something to consider for people who know the go situation in guix:
> could this be replaced with (define-public go go-1.16) after this patch?
> (And go-1.14 deleted as there are no uses of it anymore.)
> The output of "guix refresh --list-dependent go" is:
>
> Building the following 125 packages would ensure 440 dependent packages are rebuilt:
> [...]
>
> so this shouldn't cause a world-rebuild (note go packages are (reportedly)
> cheap to build). But perhaps there are API incompatibilities between 1.16 and
> 1.14? idk.

Go 1.16 does break some go packages. I have a similar patch locally but
I haven't pushed it yet because I was pursuing the different failures it
causes.

Maxim
M
M
Maxime Devos wrote on 29 Mar 2021 08:18
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
29af474b4cc48fd552cd123e71fb389ed1a0f0e9.camel@telenet.be
On Sun, 2021-03-28 at 20:46 -0400, Maxim Cournoyer wrote:
Toggle quote (10 lines)
> Hi,
>
> Maxime Devos <maximedevos@telenet.be> writes:
>
> > [...]
>
> Go 1.16 does break some go packages. I have a similar patch locally but
> I haven't pushed it yet because I was pursuing the different failures it
> causes.

Ok. If the 1.14 -> 1.16 upgrade would break packages, then it makes sense to
(at first) define the updated go as a package variant and only later use it
in the go packages once the update issues have been fixed or worked-around.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYIADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYGFxOhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7sDfAQDq32nLgg4kI7y3PMogF4jksxGQ
m9gNwxkBICDgKrL/mAD8D3GwNEz1trCWgB/MUu63kzkAX1ym9fAghPTB9VZVUwE=
=O/z1
-----END PGP SIGNATURE-----


S
S
Sarah Morgensen wrote on 6 Aug 2021 00:50
(address . 47434-done@debbugs.gnu.org)
861r7733qu.fsf@mgsn.dev
Superseded by #49221; closing.
Closed
?