diff mbox series

[bug#41695] Update Go to v1.14.4

Message ID CA+TvSRjcMM=Ro-N51sr5NErE57hDngY0mDuFZxvJczY-ktnoXQ@mail.gmail.com
State Accepted
Headers show
Series [bug#41695] Update Go to v1.14.4 | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job

Commit Message

Katherine Cox-Buday June 3, 2020, 11:36 p.m. UTC
There are too many dependent Go packages to test, but I compiled
syncthing which should be a reasonably representative test.

Comments

Jack Hill June 5, 2020, 9:07 p.m. UTC | #1
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).

[0] https://issues.guix.gnu.org/39637

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?

[1] https://golang.org/doc/go1.14

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.

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
diff mbox series

Patch

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(-)

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