[PATCH] Update Go to v1.14.4

  • Done
  • quality assurance status badge
Details
3 participants
  • Katherine Cox-Buday
  • Jack Hill
  • Christopher Baines
Owner
unassigned
Submitted by
Katherine Cox-Buday
Severity
normal
K
K
Katherine Cox-Buday wrote on 4 Jun 2020 01:36
(address . guix-patches@gnu.org)
CA+TvSRjcMM=Ro-N51sr5NErE57hDngY0mDuFZxvJczY-ktnoXQ@mail.gmail.com
There are too many dependent Go packages to test, but I compiled
syncthing which should be a reasonably representative test.
From 5db2ffd50f7284a0f18353dc15f637f9eb059504 Mon Sep 17 00:00:00 2001
From: Katherine Cox-Buday <cox.katherine.e@gmail.com>
Date: Wed, 3 Jun 2020 18:31:00 -0500
Subject: [PATCH] gnu: go: Update to 1.14.4.

* gnu/packages/golang.scm (go): Update to 1.14.4.
---
gnu/packages/golang.scm | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)

Toggle diff (66 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index ae0b7c6779..f09690aa01 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -217,19 +217,21 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(supported-systems '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux"))
(license license:bsd-3)))
-(define-public go-1.13
+(define-public go-1.14
(package
(inherit go-1.4)
(name "go")
- (version "1.13.9")
+ (version "1.14.4")
(source
(origin
- (method url-fetch)
- (uri (string-append "https://storage.googleapis.com/golang/"
- name version ".src.tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/golang/go.git")
+ (commit (string-append "go" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "07gksk9194wa90xyd6yhagxfv7syvsx29bh8ypc4mg700vc1kfrl"))))
+ "08bazglmqp123c9dgrxflvxd011xsqfxsgah2kzbvca0mhm6qcm3"))))
(arguments
(substitute-keyword-arguments (package-arguments go-1.4)
((#:phases phases)
@@ -260,7 +262,13 @@ in the style of communicating sequential processes (@dfn{CSP}).")
'("cmd/go/testdata/script/mod_case_cgo.txt"
"cmd/go/testdata/script/list_find.txt"
"cmd/go/testdata/script/list_compiled_imports.txt"
- "cmd/go/testdata/script/cgo_syso_issue29253.txt"))
+ "cmd/go/testdata/script/cgo_syso_issue29253.txt"
+ "cmd/go/testdata/script/cover_cgo.txt"
+ "cmd/go/testdata/script/cover_cgo_xtest.txt"
+ "cmd/go/testdata/script/cover_cgo_extra_test.txt"
+ "cmd/go/testdata/script/cover_cgo_extra_file.txt"))
+
+ (for-each make-file-writable (find-files "."))
(substitute* "os/os_test.go"
(("/usr/bin") (getcwd))
@@ -359,7 +367,6 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(setenv "GOROOT_FINAL" output)
(setenv "CGO_ENABLED" "1")
(invoke "sh" "all.bash"))))
-
(replace 'install
;; TODO: Most of this could be factorized with Go 1.4.
(lambda* (#:key outputs #:allow-other-keys)
@@ -405,7 +412,7 @@ in the style of communicating sequential processes (@dfn{CSP}).")
,@(package-native-inputs go-1.4)))
(supported-systems %supported-systems)))
-(define-public go go-1.13)
+(define-public go go-1.14)
(define-public go-github-com-alsm-ioprogress
(let ((commit "063c3725f436e7fba0c8f588547bee21ffec7ac5")
--
2.26.2
J
J
Jack Hill wrote on 5 Jun 2020 23:07
(name . Katherine Cox-Buday)(address . cox.katherine.e@gmail.com)(address . 41695@debbugs.gnu.org)
alpine.DEB.2.20.2006051616080.5735@marsh.hcoop.net
Katherine,

On Wed, 3 Jun 2020, Katherine Cox-Buday wrote:

Toggle quote (3 lines)
> There are too many dependent Go packages to test, but I compiled
> syncthing which should be a reasonably representative test.

Thanks for working on updating Go.

I have rebuilt all the packages reported by `guix refresh -l go`. The
three failures were stress-make, which was already broken (build log
attached), mongodb-tools, which was already broken [0], and docker (build
log attached).


Reading through the Go release notes [1], the following change to the
net/url package caught my eye:

Toggle quote (4 lines)
> When parsing of a URL fails (for example by Parse or ParseRequestURI),
> the resulting Error message will now quote the unparsable URL. This
> provides clearer structure and consistency with other parsing errors.

I think this could be the cause of the docker test failure. Should we
patch docker or perhaps try to update it?


Another item from the release notes about changes to the Go runtime:

Toggle quote (10 lines)
> A consequence of the implementation of preemption is that on Unix
> systems, including Linux and macOS systems, programs built with Go 1.14
> will receive more signals than programs built with earlier releases.
> This means that programs that use packages like syscall or
> golang.org/x/sys/unix will see more slow system calls fail with EINTR
> errors. Those programs will have to handle those errors in some way,
> most likely looping to try the system call again. For more information
> about this see man 7 signal for Linux systems or similar documentation
> for other systems.

I didn't notice any problems caused by this during package rebuilds and
testing, but it sounds like something that could be difficult to write
automated tests for, so we should probably be on the lookout for future
problems at runtime.

I'm happy to see that that the go modules changes didn't cause us any
problems with this upgrade.

As far as I can tell, once the problem with docker is addressed, this
patch could be applied, perhaps after updating Katherine copyright line.

I am curious, why switch to using git-fetch?

Best,
Jack
Attachment: docker-build-log
Attachment: stress-make-log
K
K
Katherine Cox-Buday wrote on 6 Jun 2020 21:13
(name . Jack Hill)(address . jackhill@jackhill.us)(address . 41695@debbugs.gnu.org)
87d06c0zza.fsf@gmail.com
Jack Hill <jackhill@jackhill.us> writes:

Toggle quote (14 lines)
> Katherine,
>
> On Wed, 3 Jun 2020, Katherine Cox-Buday wrote:
>
>> There are too many dependent Go packages to test, but I compiled
>> syncthing which should be a reasonably representative test.
>
> Thanks for working on updating Go.
>
> I have rebuilt all the packages reported by `guix refresh -l go`. The
> three failures were stress-make, which was already broken (build log
> attached), mongodb-tools, which was already broken [0], and docker
> (build log attached).

You're welcome! Thanks for the review. I wish I had more time to
contribute to Guix.

I suppose I should have qualified my statement by saying there's too
many dependent Go packages for me to test. I should invest in a better
computer :)

Toggle quote (11 lines)
> Reading through the Go release notes [1], the following change to the
> net/url package caught my eye:
>
>> When parsing of a URL fails (for example by Parse or
>> ParseRequestURI), the resulting Error message will now quote the
>> unparsable URL. This provides clearer structure and consistency with
>> other parsing errors.
>
> I think this could be the cause of the docker test failure. Should we
> patch docker or perhaps try to update it?

Spot on! I've updated docker and docker-cli. hyperledger-fabric depends
on docker-cli and also continues to build. I've attached a patch which
should supersede the prior patch. It updates go, docker, and docker-cli
atomically.

Toggle quote (17 lines)
> Another item from the release notes about changes to the Go runtime:
>
>> A consequence of the implementation of preemption is that on Unix
>> systems, including Linux and macOS systems, programs built with Go
>> 1.14 will receive more signals than programs built with earlier
>> releases. This means that programs that use packages like syscall or
>> golang.org/x/sys/unix will see more slow system calls fail with
>> EINTR errors. Those programs will have to handle those errors in
>> some way, most likely looping to try the system call again. For more
>> information about this see man 7 signal for Linux systems or similar
>> documentation for other systems.
>
> I didn't notice any problems caused by this during package rebuilds
> and testing, but it sounds like something that could be difficult to
> write automated tests for, so we should probably be on the lookout for
> future problems at runtime.

Agreed.

Toggle quote (3 lines)
> I'm happy to see that that the go modules changes didn't cause us any
> problems with this upgrade.

I believe 1.14 represents a stabilization of the modules feature, so I
would expect future updates to go smoothly as well.

Toggle quote (2 lines)
> I am curious, why switch to using git-fetch?

`guix lint` now complains about downloading tarballs. I have also
recently seen some chatter on the mailing list about preferring this.
--
Katherine
J
J
Jack Hill wrote on 7 Jun 2020 04:13
(name . Katherine Cox-Buday)(address . cox.katherine.e@gmail.com)(address . 41695@debbugs.gnu.org)
alpine.DEB.2.20.2006062144370.5735@marsh.hcoop.net
On Sat, 6 Jun 2020, Katherine Cox-Buday wrote:

Toggle quote (9 lines)
> Jack Hill <jackhill@jackhill.us> writes:
>
> You're welcome! Thanks for the review. I wish I had more time to
> contribute to Guix.
>
> I suppose I should have qualified my statement by saying there's too
> many dependent Go packages for me to test. I should invest in a better
> computer :)

More computing is nice, but in the meantime, I'm happy to be part of a
community of other Guix people who can provide extra cycles when needed.

I'd like to recognize the work Chris and Danjela are doing on Guix Data
Service to ease patch review as well.

Toggle quote (16 lines)
>> Reading through the Go release notes [1], the following change to the
>> net/url package caught my eye:
>>
>>> When parsing of a URL fails (for example by Parse or
>>> ParseRequestURI), the resulting Error message will now quote the
>>> unparsable URL. This provides clearer structure and consistency with
>>> other parsing errors.
>>
>> I think this could be the cause of the docker test failure. Should we
>> patch docker or perhaps try to update it?
>
> Spot on! I've updated docker and docker-cli. hyperledger-fabric depends
> on docker-cli and also continues to build. I've attached a patch which
> should supersede the prior patch. It updates go, docker, and docker-cli
> atomically.

I'm happy to confirm that the revised path fixes the docker problem here
as well.

[…]

Toggle quote (5 lines)
>> I am curious, why switch to using git-fetch?
>
> `guix lint` now complains about downloading tarballs. I have also
> recently seen some chatter on the mailing list about preferring this.

Right, I remember that thread, thanks!

Hopefully a more experienced reviewer/committer will confirm that
everything looks good and push soon.

Best,
Jack
C
C
Christopher Baines wrote on 26 Jun 2020 12:55
(address . 41695-done@debbugs.gnu.org)
87bll66qqu.fsf@cbaines.net
Jack Hill <jackhill@jackhill.us> writes:

Toggle quote (49 lines)
> On Sat, 6 Jun 2020, Katherine Cox-Buday wrote:
>
>> Jack Hill <jackhill@jackhill.us> writes:
>>
>> You're welcome! Thanks for the review. I wish I had more time to
>> contribute to Guix.
>>
>> I suppose I should have qualified my statement by saying there's too
>> many dependent Go packages for me to test. I should invest in a better
>> computer :)
>
> More computing is nice, but in the meantime, I'm happy to be part of a
> community of other Guix people who can provide extra cycles when
> needed.
>
> I'd like to recognize the work Chris and Danjela are doing on Guix
> Data Service to ease patch review as well.
>
>>> Reading through the Go release notes [1], the following change to the
>>> net/url package caught my eye:
>>>
>>>> When parsing of a URL fails (for example by Parse or
>>>> ParseRequestURI), the resulting Error message will now quote the
>>>> unparsable URL. This provides clearer structure and consistency with
>>>> other parsing errors.
>>>
>>> I think this could be the cause of the docker test failure. Should we
>>> patch docker or perhaps try to update it?
>>
>> Spot on! I've updated docker and docker-cli. hyperledger-fabric depends
>> on docker-cli and also continues to build. I've attached a patch which
>> should supersede the prior patch. It updates go, docker, and docker-cli
>> atomically.
>
> I'm happy to confirm that the revised path fixes the docker problem
> here as well.
>
> […]
>
>>> I am curious, why switch to using git-fetch?
>>
>> `guix lint` now complains about downloading tarballs. I have also
>> recently seen some chatter on the mailing list about preferring this.
>
> Right, I remember that thread, thanks!
>
> Hopefully a more experienced reviewer/committer will confirm that
> everything looks good and push soon.

Thanks for the patch Katherine, and thanks to doing some review
Jack. I've had a look now, and pushed (with a small commit message
changes): 6e9f8826087fbd824c546f6daad70f090fa1a8d7

Thanks again,

Chris
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl711BlfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9Xd0Iw/+O/0Gz4dEImd+KApQXJeI6u/XUB8Mm0bbtxMPF6Wu1rGc24o1jIZDrV+T
WIWhIOYGhRA429LWR38dBoKBNmvh7TGMqILpkpXEXTqRSIKQVehG3Zozun+VZpMn
sTmugYLF0G5lTAz9Uwpr1NsaUwYxkZakNGHzcx25YkhWkgFWJBq6cif3R8rClbpW
gGOQZHgL5G2YioqLa5eI91Cb0Xd9MUW97rLTiPs0Nr9B4cm5if5Py7CYJT84f1Ln
5ugbUbAaGPn5M5yTEGKErXw41Bk32vMFKe4tD8oeDtSCrN+tJ4ZEoho0cCzAm6m/
iJo/jkuuV+B8ge0e6oB6bym3N0qGaRozLmtn8MQsMjxLlhO/YiR7KKO2yEmuKvTa
/bw8TSU7DmtSoLpsByeIdHZyoKsvEDvkl5nozXWe2EHf9KR2r+eXOOEVu+hfG15G
oZOzjrAD50+KDh7kBWcbORFDuOTIDFg4HeJYgmvZOxels0QPF02fFAeTZWX/z/EI
pkjLlcq65gOs1IVN1D4Ap16dt0M5svMi8BOrWspSd6Vm05ht+G9cjPyOUXjQvk3B
Re8pDFQYDbRFcIjs2fOf0Be4vXuXgjSUR2g8q2vT4Na4niCviIfl5v25W59gfE4w
LHMTN49DoJfZWGJB35tOdiWFFqAmBjrEeGR1qcP8lvH1qgVyAKw=
=kifo
-----END PGP SIGNATURE-----

Closed
?