unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* help updateing go to 1.13
@ 2020-02-08  3:59 Jack Hill
  2020-02-08 17:18 ` Alex Griffin
  0 siblings, 1 reply; 4+ messages in thread
From: Jack Hill @ 2020-02-08  3:59 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1418 bytes --]

Hi Guix,

I thought I would try my hand at updating our go package to 1.13. Looking 
at the release notes [0] it didn't look to bad. What I have so far can be 
found in the attached patch.

With the patch, go builds. To spot check that everything still looked 
okay, I also tried to build syncthing. Doing so, however, failed when it 
tried to fetch a dependency from the network:

```
go: github.com/AudriusButkevicius/go-nat-pmp@v0.0.0-20160522074932-452c97607362: Get https://proxy.golang.org/github.com/%21audrius%21butkevicius/go-nat-pmp/@v/v0.0.0-20160522074932-452c97607362.mod: dial tcp: lookup proxy.golang.org on [::1]:53: read udp [::1]:35040->[::1]:53: read: connection refused
command "go" "run" "build.go" "-no-upgrade" failed with status 1
builder for `/gnu/store/5zs0yrcvr0vwsashsn2i5vx1fgynhmaw-syncthing-1.2.2.drv' failed with exit code 1
```

go-github-com-audriusbutkevicius-go-nat-pmp is listed as an input for 
syncthing. I don't know why the change in compiler version would have 
caused this. Thoughts?

[0] https://golang.org/doc/go1.13

[1] On thing that might need addition thinking is that `go get` in 1.13 
now uses the Google mirror for fetching modules and cheksums which is 
different than current behavior. I'm not sure if this poses any privacy 
concerns for the user, and would like to hear what other's think, but this 
is not the main problem I'm struggling with today.

Best,
Jack

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff; NAME=0001-WIP-gnu-go-update-to-1.13.patch, Size: 2291 bytes --]

From 4a8147b8b447b30501f2fcb4d157cc8cc79ce6c2 Mon Sep 17 00:00:00 2001
From: Jack Hill <jackhill@jackhill.us>
Date: Fri, 7 Feb 2020 17:22:58 -0500
Subject: [PATCH] WIP: gnu: go: update to 1.13

---
 gnu/packages/golang.scm | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 9102469749..798600f680 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -216,11 +216,11 @@ 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.12
+(define-public go-1.13
   (package
     (inherit go-1.4)
     (name "go")
-    (version "1.12.16")
+    (version "1.13.7")
     (source
      (origin
        (method url-fetch)
@@ -228,7 +228,7 @@ in the style of communicating sequential processes (@dfn{CSP}).")
                            name version ".src.tar.gz"))
        (sha256
         (base32
-         "1y0x10fsvgpc1x24b9q9y6kv9b0kwf7879am3p0gym2abgc5wvnf"))))
+         "1x21kfpzfkvmqd42pan6nl862m7jjl4niqxxpcgm46awbz645bg4"))))
     (arguments
      (substitute-keyword-arguments (package-arguments go-1.4)
        ((#:phases phases)
@@ -367,7 +367,6 @@ in the style of communicating sequential processes (@dfn{CSP}).")
                       (docs (string-append doc_out "/share/doc/" ,name "-" ,version))
                       (src (string-append
                             (assoc-ref outputs "tests") "/share/" ,name "-" ,version)))
-                 (delete-file-recursively "../pkg/bootstrap")
                  ;; Prevent installation of the build cache, which contains
                  ;; store references to most of the tools used to build Go and
                  ;; would unnecessarily increase the size of Go's closure if it
@@ -405,7 +404,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.12)
+(define-public go go-1.13)
 
 (define-public go-github-com-alsm-ioprogress
   (let ((commit "063c3725f436e7fba0c8f588547bee21ffec7ac5")
-- 
2.25.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: help updateing go to 1.13
  2020-02-08  3:59 help updateing go to 1.13 Jack Hill
@ 2020-02-08 17:18 ` Alex Griffin
  2020-02-08 19:14   ` Jack Hill
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Griffin @ 2020-02-08 17:18 UTC (permalink / raw)
  To: guix-devel

I believe the go-build-system will need to be updated to support Go modules. For some reason they thought it would be a good idea for `go build` to access the network for consistency with `go get`. Until we figure out what to do about this, I think we can just set the $GO111MODULE environment variable to "off".

https://golang.org/cmd/go/#hdr-Module_support

-- 
Alex Griffin

On Sat, Feb 8, 2020, at 3:59 AM, Jack Hill wrote:
> Hi Guix,
> 
> I thought I would try my hand at updating our go package to 1.13. Looking 
> at the release notes [0] it didn't look to bad. What I have so far can be 
> found in the attached patch.
> 
> With the patch, go builds. To spot check that everything still looked 
> okay, I also tried to build syncthing. Doing so, however, failed when it 
> tried to fetch a dependency from the network:
> 
> ```
> go: 
> github.com/AudriusButkevicius/go-nat-pmp@v0.0.0-20160522074932-452c97607362: Get https://proxy.golang.org/github.com/%21audrius%21butkevicius/go-nat-pmp/@v/v0.0.0-20160522074932-452c97607362.mod: dial tcp: lookup proxy.golang.org on [::1]:53: read udp [::1]:35040->[::1]:53: read: connection refused
> command "go" "run" "build.go" "-no-upgrade" failed with status 1
> builder for 
> `/gnu/store/5zs0yrcvr0vwsashsn2i5vx1fgynhmaw-syncthing-1.2.2.drv' 
> failed with exit code 1
> ```
> 
> go-github-com-audriusbutkevicius-go-nat-pmp is listed as an input for 
> syncthing. I don't know why the change in compiler version would have 
> caused this. Thoughts?
> 
> [0] https://golang.org/doc/go1.13
> 
> [1] On thing that might need addition thinking is that `go get` in 1.13 
> now uses the Google mirror for fetching modules and cheksums which is 
> different than current behavior. I'm not sure if this poses any privacy 
> concerns for the user, and would like to hear what other's think, but this 
> is not the main problem I'm struggling with today.
> 
> Best,
> Jack
> Attachments:
> * 0001-WIP-gnu-go-update-to-1.13.patch

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: help updateing go to 1.13
  2020-02-08 17:18 ` Alex Griffin
@ 2020-02-08 19:14   ` Jack Hill
  2020-02-11 19:52     ` Jack Hill
  0 siblings, 1 reply; 4+ messages in thread
From: Jack Hill @ 2020-02-08 19:14 UTC (permalink / raw)
  To: Alex Griffin; +Cc: guix-devel


On Sat, 8 Feb 2020, Alex Griffin wrote:

> I believe the go-build-system will need to be updated to support Go modules. For some reason they thought it would be a good idea for `go build` to access the network for consistency with `go get`. Until we figure out what to do about this, I think we can just set the $GO111MODULE environment variable to "off".
>
> https://golang.org/cmd/go/#hdr-Module_support

Thanks, I'm reading that and guix/build/go-build-system.scm now.

Best,
Jack

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: help updateing go to 1.13
  2020-02-08 19:14   ` Jack Hill
@ 2020-02-11 19:52     ` Jack Hill
  0 siblings, 0 replies; 4+ messages in thread
From: Jack Hill @ 2020-02-11 19:52 UTC (permalink / raw)
  To: guix-devel

Thanks for the advice. I've submitted a minimal patch to update go to 
1.13: https://issues.guix.gnu.org/issue/39570

Best,
Jack

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-11 19:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-08  3:59 help updateing go to 1.13 Jack Hill
2020-02-08 17:18 ` Alex Griffin
2020-02-08 19:14   ` Jack Hill
2020-02-11 19:52     ` Jack Hill

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).