[PATCH 0/1] Update go?

  • Done
  • quality assurance status badge
Details
4 participants
  • Jack Hill
  • Leo Famulari
  • David Dashyan
  • Maxim Cournoyer
Owner
unassigned
Submitted by
David Dashyan
Severity
normal
D
D
David Dashyan wrote on 10 Dec 2020 16:10
(address . guix-patches@gnu.org)(name . David Dashyan)(address . mail@davie.li)
20201210151024.25316-1-mail@davie.li
Yesterday I found packages that won't compile with curent guix's
go-1.14. Apparently 1.15 is the "stable" thing today.

I've updated go package locally but when I try to run './pre-inst-env guix
build --rounds=3 go' guix just spits out currently installed go-1.14 store
directories. Am I right that this is not how it should work? It supposed to
find the modified version in source tree, right?

When I do ./pre-inst-env guile - I see local wortree in front of %load-path
tho. Strange.

But I've tested it ;) builds and works.

Additional test file in 'for-each delete' is required for the reasons stated
in the comment above.

David Dashyan (1):
gnu: Update go

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


base-commit: 0faef871784f4f88e622dd36b492f020387f7a5e
--
2.29.2
D
D
David Dashyan wrote on 10 Dec 2020 16:17
[PATCH 1/1] gnu: Update go
(address . 45161@debbugs.gnu.org)(name . David Dashyan)(address . mail@davie.li)
20201210151755.25621-1-mail@davie.li
---
gnu/packages/golang.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

Toggle diff (47 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 3b42bf3c8f..e367eb4d16 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -23,6 +23,7 @@
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020 raingloom <raingloom@riseup.net>
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
+;;; Copyright © 2020 David Dashyan <mail@davie.li>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -230,11 +231,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.14
+(define-public go-1.15
(package
(inherit go-1.4)
(name "go")
- (version "1.14.10")
+ (version "1.15.6")
(source
(origin
(method git-fetch)
@@ -244,7 +245,7 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(file-name (git-file-name name version))
(sha256
(base32
- "0h1nmqzjc0xxpn6n2hjq7692gdqkznagzdmiq9490yzkrrii2lgk"))))
+ "0pg811lfw1pdp0cba4jvsqbwjaqrqz6m7jspbc80r17snd7flk2z"))))
(arguments
(substitute-keyword-arguments (package-arguments go-1.4)
((#:system system)
@@ -277,7 +278,8 @@ in the style of communicating sequential processes (@dfn{CSP}).")
;; not find object files/headers despite being present.
(for-each
delete-file
- '("cmd/go/testdata/script/mod_case_cgo.txt"
+ '("cmd/go/testdata/script/ldflag.txt"
+ "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"
--
2.29.2
J
J
Jack Hill wrote on 10 Dec 2020 18:13
Re: [bug#45161] [PATCH 0/1] Update go?
(name . David Dashyan)(address . mail@davie.li)(address . 45161@debbugs.gnu.org)
alpine.DEB.2.21.2012101210380.5691@marsh.hcoop.net
David,

On Thu, 10 Dec 2020, David Dashyan wrote:

Toggle quote (3 lines)
> Yesterday I found packages that won't compile with curent guix's
> go-1.14. Apparently 1.15 is the "stable" thing today.

Awesome, thanks for working on this!

Toggle quote (5 lines)
> I've updated go package locally but when I try to run './pre-inst-env guix
> build --rounds=3 go' guix just spits out currently installed go-1.14 store
> directories. Am I right that this is not how it should work? It supposed to
> find the modified version in source tree, right?

I think this is because the go still points at 1.14, see the following
definition:

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

We should probably update that so 1.15 is the new default version.

Toggle quote (2 lines)
> But I've tested it ;) builds and works.

I've started testing it locally. I'll report back if I notice anything.

Best,
Jack
L
L
Leo Famulari wrote on 10 Dec 2020 18:37
(name . David Dashyan)(address . mail@davie.li)(address . 45161@debbugs.gnu.org)
X9JcwBUDRYMjdvEV@jasmine.lan
On Thu, Dec 10, 2020 at 06:10:24PM +0300, David Dashyan wrote:
Toggle quote (3 lines)
> Yesterday I found packages that won't compile with curent guix's
> go-1.14. Apparently 1.15 is the "stable" thing today.

The Go policy is to support 2 major releases. Since 1.15 is the current
major release, that means that 1.14 is still supported upstream. So
please keep 1.14 unless we don't need it anymore. For example, if no
Guix packages require it. That means ensuring that all the existing Go
packages build successfully... or that there is no new breakage :)

L
L
Leo Famulari wrote on 10 Dec 2020 18:43
Re: [bug#45161] [PATCH 1/1] gnu: Update go
(name . David Dashyan)(address . mail@davie.li)(address . 45161@debbugs.gnu.org)
X9JeRHsPtGeLlbcB@jasmine.lan
On Thu, Dec 10, 2020 at 06:17:55PM +0300, David Dashyan wrote:
Toggle quote (8 lines)
> -(define-public go-1.14
> +(define-public go-1.15
> (package
> (inherit go-1.4)
> (name "go")
> - (version "1.14.10")
> + (version "1.15.6")

Thanks! I'm doing some tests now. As Jack said, we'll need to update the
'go' package as well in order for this to take effect.

Depending on whether or not the Go packages work with 1.15, we might
need to keep 1.14 around for a while.

For example, check out a Git worktree at commit
18199da4b79ce79d5002c3290cc1fa95454d92ce (gnu: Add Go 1.12.)

In that commit, we added 1.12 but kept 1.11 as the default Go compiler.

$ git worktree add /tmp/guix-multiple-go-compilers 18199da4b79ce79d5002c3290cc1fa95454d92ce && cd /tmp/guix-multiple-go-compilers
J
J
Jack Hill wrote on 11 Dec 2020 07:15
Re: [bug#45161] [PATCH 0/1] Update go?
(name . Leo Famulari)(address . leo@famulari.name)
alpine.DEB.2.21.2012110045490.5691@marsh.hcoop.net
On Thu, 10 Dec 2020, Leo Famulari wrote:

Toggle quote (10 lines)
> On Thu, Dec 10, 2020 at 06:10:24PM +0300, David Dashyan wrote:
>> Yesterday I found packages that won't compile with curent guix's
>> go-1.14. Apparently 1.15 is the "stable" thing today.
>
> The Go policy is to support 2 major releases. Since 1.15 is the current
> major release, that means that 1.14 is still supported upstream. So
> please keep 1.14 unless we don't need it anymore. For example, if no
> Guix packages require it. That means ensuring that all the existing Go
> packages build successfully... or that there is no new breakage :)

I've tested go 1.15 by trying to build the packages reported by `guix
refresh -l go` on x86_64. There are some new build failures, but it
doesn't look too bad. In fact, I've already fixed on of them, by updating
go-github-com-kr-pretty in #45171 [0]. There were a number of packages
whose tests failed because of changes [1] to `go vet`. The new kr-pretty
release adjusts to the new vet behavior with a one line change [2]
(kr-pretty had fortunately not fallen into the incorrect string() usage
for which vet is now warning).


The other new build failures are:

go-etcd-io-bbolt
syncthing
restic
go-github-com-emicklei-go-restful
docker
go-github-com-magiconair-properties

I was unable to test at least

chezmoi
exercism
syncthing-gtk

because they depend on a package that failed to build.

fiano-fmap [3] and mongo-tools [4] continue to fail to build.


Best,
Jack
J
J
Jack Hill wrote on 12 Dec 2020 23:51
(name . Jack Hill)(address . jackhill@jackhill.us)
alpine.DEB.2.21.2012121750060.5691@marsh.hcoop.net
On Fri, 11 Dec 2020, Jack Hill wrote:

Toggle quote (2 lines)
> The other new build failures are:

[…]

Toggle quote (2 lines)
> go-github-com-magiconair-properties

Updating go-github-com-magiconair-properties to 1.8.4 solves the problem.
I've sent a patch in #45216


Best,
Jack
D
D
David Dashyan wrote on 13 Dec 2020 22:34
[PATCH] gnu: Add go-1.15
(address . 45161@debbugs.gnu.org)(name . David Dashyan)(address . mail@davie.li)
20201213213416.30959-1-mail@davie.li
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 3b42bf3c8f..a4e62d7d6b 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -23,6 +23,7 @@
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020 raingloom <raingloom@riseup.net>
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
+;;; Copyright © 2020 David Dashyan <mail@davie.li>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -434,6 +435,29 @@ in the style of communicating sequential processes (@dfn{CSP}).")
,@(package-native-inputs go-1.4)))
(supported-systems %supported-systems)))
+(define-public go-1.15
+ (package
+ (inherit go-1.14)
+ (name "go")
+ (version "1.15.6")
+ (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
+ "0pg811lfw1pdp0cba4jvsqbwjaqrqz6m7jspbc80r17snd7flk2z"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments go-1.14)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'prebuild 'postprebuild
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (delete-file "cmd/go/testdata/script/ldflag.txt")))))))))
+
(define-public go go-1.14)
(define-public go-github-com-alsm-ioprogress

base-commit: 11c3744275de591b74f761d126667ab81b0efcee
--
2.29.2
D
D
David Dashyan wrote on 13 Dec 2020 22:31
Re: [bug#45161] [PATCH 1/1] gnu: Update go
87tuspz946.fsf@davie.li
Hello Jack and Leo!

Thank you for review and for picking it up :)

As suggested senditng the patch adding go-1.15 but keeping go-1.14.

--
David aka zzappie
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEO/jjc8vL6ogZzi191p8mXoi/t8oFAl/WiB0ACgkQ1p8mXoi/
t8rslA//aXV0ecBj4lGlxTHoalax0t0uLn+6+V4KZM46nz4VABSzn3S1HobjjDX0
1zgsfdU7fP9rqg3T/htX9k07V7BEVhew4BJKnS8VlmEk9l++54iW13NrLl+2c27u
VqTej/RAm5SKFDnYIh2ikp/ihRcAC6N0VyvRNqXCq1DPdBwjlEnQU5E2I7JelYd1
Z7KwPcNr7f8rb3yFCTsG7ALMSWiFrfLhF9CBDGXwfUFHxxg3PUzzi1CGYJ2lIzJC
zeWi7QZiGJiSMkwR41mNUtYDXaFbW9MpUrBvH3baSfvVhLDXfCxX43jfUgLHxj4g
P7RugbW0c8kFkJ9AJUQhdGYYHcKrd7kvH9D5bhmjThVZmdzRGOfFvlBynAto+Lm8
Jj/x9pZnzWoX/lBwjkFXKxSHtfCPi4b3Cs9tnz6w/ThAqXLOSeMto5Fk08W+jjf/
UC+0I0TLoRf0Ow3avUsIX6YfBuyutkzUI2D8yYJzzl0671KphTU0t9ab76UvyC4q
axK+YU+i7oxM6ytiQptyEYzNBDJylzSMMKHFoXep7uxAEpng2CMhyGMc4c9ruO6q
xyXbAiV8wa3oYrpmI+Bufh+g+hcBGMIlOELdHWLefSqs4MKN/GPn8zvRY+vWkAga
KdbiZjcILXrZ7xwoYW4ZNBIF/0InG7ReE6r2jHVRzfQhPfji5zQ=
=Nuz2
-----END PGP SIGNATURE-----

D
D
David Dashyan wrote on 13 Dec 2020 22:57
Re: [bug#45161] [PATCH 0/1] Update go?
(name . Jack Hill)(address . jackhill@jackhill.us)(address . 45161@debbugs.gnu.org)
87r1ntz7wh.fsf@davie.li
Hello again!

Jack Hill writes:

Toggle quote (8 lines)
> I've tested go 1.15 by trying to build the packages reported by `guix refresh -l
> go` on x86_64. There are some new build failures, but it doesn't look too
> bad. In fact, I've already fixed on of them, by updating go-github-com-kr-pretty
> in #45171 [0]. There were a number of packages whose tests failed because of
> changes [1] to `go vet`. The new kr-pretty release adjusts to the new vet
> behavior with a one line change [2] (kr-pretty had fortunately not fallen into
> the incorrect string() usage for which vet is now warning).

May I ask how do you do afterer redefining "go" to point to go-1.15 and
getting list of deppending packages? I mean how one buids all depended
packages in one move if there such a way to do this?

--
David aka zzappie
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEO/jjc8vL6ogZzi191p8mXoi/t8oFAl/WjkMACgkQ1p8mXoi/
t8oTYRAAneJzKCI/H+/BxDIwwZvl3O/au/zbkN9s8m66RUeq6uREXZII6//o+czV
SotCbYGTOPte+5eG7NjiJ2B6162sD+kHFlUI3zISnPzSYCrUQJ+illJN/2a69782
y98nlqEHQU3ky/2ABC2QxDSX4W8dtXAvJ8GjSguwCGxga1SQpu5KKRo2wq9oClwx
p7kFMH+kPtJxhRWR2aj8+6Qvc+SMutw9SSEqsV6Hngb4XCbTD+OBcJDAX1PVaMd2
HN3UsIvAdWyzl7NfqSRDpEh6aESZYAzRz0VHtmdjboDakPo7WV1rX0zQfBlDjOTe
m+21ONkA9jmYQX7XTxcTxBJeuAORH20B+w4VyTqgifCPJN8qYifeGwBaWQ7/KHzu
x1LoAfonoVH9vGC5Gs1oT2YFaL33I4s1ffKX0Rk6tAoRZ9JWuQzyQFlw860zsH3o
MhsEaqWXvN7icWXoZGSCfYKZ0kuOlghxswZxndcWmC44/cabbdCdBHEc7/toOOsJ
bPXXQvkCvLeRRgUUekv0yGg2oGCNh+aFLfJG66Lk234TGpac5uF4YH9CUASNSkPU
CnyJRJ/3KVGVKbAAyR+TZgMOejlSw1xuuNI8UXT4MjeW52Wk6kYYXL1wZvq5Dw8I
DkDbe43r7L1PexOe7P3xMFoR6giV9npips+Knc/wI2u+gPC1e7Q=
=FAud
-----END PGP SIGNATURE-----

D
D
David Dashyan wrote on 14 Dec 2020 14:10
(name . David Dashyan)(address . mail@davie.li)
878sa0zg71.fsf@davie.li
David writes:

Toggle quote (3 lines)
> May I ask how do you do afterer redefining "go" to point to go-1.15 and
> getting list of deppending packages? I mean how one buids all depended
> packages in one move if there such a way to do this?
Oops. It should have been something like:

"what do you do after redefining "go" package and getting list of
depending packages? I mean how one buids all packages that depend on
go in one move if there such a way to do this?"

It was late I was sleepy :)

--
David aka zzappie
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEO/jjc8vL6ogZzi191p8mXoi/t8oFAl/XZEcACgkQ1p8mXoi/
t8rtIw//dW1UNkafTyhWGIFuoCtVTEKHOHS/C7+MUVY7RhEgkugY0umvnoZ3AetX
Uz4dqkod/d3SBXjLnQAgnUrocY9ReZGREDxczFP/YI0+QGf8zxWzrp+5cctYS/y6
lKK/0hkVl6lF6e1KnT1k/IDPob0UkTmoBCadZby1VPqWHFkDufkNqZOi3CW2QUMJ
paInIAMw92OyFyNwF5pXlvZKe+p4Y/yfVd2NC2/tz5zb1XiRnG0/d19421JTQPeN
UOrcvvcFOK4C8A/LzTT7tp8sxr6ltqCpQTcK2bPp29umJPEmikWK48eX1QrSHxXs
AxWxZSzz6hwJf7oQbeMTeKEEeXC0Q7dpspTfiBctsuyR+kVqRU5HGDjTnIgGtill
Lla1yuqEMl8PevZVGFUA/qw4gv2LM+gHMZP5AYxcdfcvozl8RSXR6vTriEaTFJAa
nOaZNonM5JI6gOaYdaRAD76trRmqRqrn/Tle6xGX5uA6zJeDYwtO34f1ELOpd1lI
7RRnun60jBfi4zSZ7VTonkVleKBOpnq0L6tQaGUBuzHs4hsxZjb94FeVXmt1QL01
Nsjua8U0v1PILNQP+e2FEu1LC+aa/9IB5g2oOoinnqErP0kqY6Lj9FOjpAJ7tmfQ
Apk8JKcIJDg8HJCUirYk8r1SrZEGBCiCr6hvh8zoY0Aa4igXAGU=
=x5p5
-----END PGP SIGNATURE-----

J
J
Jack Hill wrote on 14 Dec 2020 22:53
(name . David Dashyan)(address . mail@davie.li)
alpine.DEB.2.21.2012131810150.5691@marsh.hcoop.net
On Mon, 14 Dec 2020, David Dashyan wrote:

Toggle quote (17 lines)
>
> Hello again!
>
> Jack Hill writes:
>
>> I've tested go 1.15 by trying to build the packages reported by `guix refresh -l
>> go` on x86_64. There are some new build failures, but it doesn't look too
>> bad. In fact, I've already fixed on of them, by updating go-github-com-kr-pretty
>> in #45171 [0]. There were a number of packages whose tests failed because of
>> changes [1] to `go vet`. The new kr-pretty release adjusts to the new vet
>> behavior with a one line change [2] (kr-pretty had fortunately not fallen into
>> the incorrect string() usage for which vet is now warning).
>
> May I ask how do you do afterer redefining "go" to point to go-1.15 and
> getting list of deppending packages? I mean how one buids all depended
> packages in one move if there such a way to do this?

Sure. For me it involved some manual effort. There might be a more clever
way to script it that others can share, but I didn't think it was too bad,
and it allowed me to make notes about what problems I observed as I
encountered them. Nothing I did was Go-specific. Perhaps a small project
for another time, we could add a cookbook recipe for testing upgrades to
languages or other packages with many dependents.

Here's what I did after changing the default go:

* ran `./pre-inst-env guix refresh -l go` and recorded the list of
packages to build.

* ran `./pre-inst-env guix build` with that list.

* After a while there is a build failure, and the end of the log looks
like (the actually failure here is unimportant):

```
FAIL go.etcd.io/bbolt 600.127s
FAIL
command "go" "test" "go.etcd.io/bbolt" failed with status 1

Some deprecated features have been used. Set the environment
variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
program to get more information. Set it to "no" to suppress
this message.
builder for `/gnu/store/6dshsgwryfj8g27sf24sp7lhnpf639d1-go-etcd-io-bbolt-1.3.5.drv' failed with exit code 1
@ build-failed /gnu/store/6dshsgwryfj8g27sf24sp7lhnpf639d1-go-etcd-io-bbolt-1.3.5.drv - 1 builder for `/gnu/store/6dshsgwryfj8g27sf24sp7lhnpf639d1-go-etcd-io-bbolt-1.3.5.drv' failed with exit code 1
derivation '/gnu/store/6dshsgwryfj8g27sf24sp7lhnpf639d1-go-etcd-io-bbolt-1.3.5.drv' offloaded to 'libre-02.local' failed: build of `/gnu/store/6dshsgwryfj8g27sf24sp7lhnpf639d1-go-etcd-io-bbolt-1.3.5.drv' failed
build of /gnu/store/6dshsgwryfj8g27sf24sp7lhnpf639d1-go-etcd-io-bbolt-1.3.5.drv failed
View build log at '/var/log/guix/drvs/6d/shsgwryfj8g27sf24sp7lhnpf639d1-go-etcd-io-bbolt-1.3.5.drv.bz2'.
cannot build derivation `/gnu/store/23jx3gb17gdhz662d3dsrmfnpp92abw4-chezmoi-1.8.1.drv': 1 dependencies couldn't be built
guix build: error: build of `/gnu/store/23jx3gb17gdhz662d3dsrmfnpp92abw4-chezmoi-1.8.1.drv' failed
```

* From this, I make a not the go-etcd-io-bbolt has a build failure, and
that I was unable to attempt chezmoi.

* I remove chezmoi from the list of packages to build and re-run `guix
build`.

Repeat that process until all the remaining packages build, and you should
have a nice list of build failures and builds that could not be attempted.

Hope that helps,
Jack
M
M
Maxim Cournoyer wrote on 5 Aug 2021 18:56
control message for bug #45161
(address . control@debbugs.gnu.org)
875ywj96fa.fsf@gmail.com
close 45161
quit
?
Your comment

This issue is archived.

To comment on this conversation send an email to 45161@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 45161
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch