Commit c283c1db authored by Kirill Smelkov's avatar Kirill Smelkov

golang: v↑ go1.16

Go1.16 is incremental improvement over Go1.15 with better and faster compiler,
runtime and module-mode improvements:

https://blog.golang.org/go1.16
https://golang.org/doc/go1.16

Since this Go release switches GO111MODULE default from "auto" to "on", but we
still have in-tree GOPATH-mode uses, add GO111MODULE=auto to our goenv.sh to
preserve previous behaviour for now.

Don't drop support for Go1.14, Go1.13, Go1.12 yet, as that no longer supported
Go releases are still being used by in-tree components(*).

Remain default at Go1.15 yet.

Switch helloworld to Go1.16 and test this patch on that
software-release.

(*) theia, caddy, galene, replication-manager, restic, gitlab and grafana
parent 51de7abc
......@@ -68,6 +68,15 @@ md5sum = 7e4b8580bfe25ffc51501b1dc3d2d8ce
environment-extra =
GOROOT_BOOTSTRAP=${golang14:location}
[golang1.16]
<= golang-common
url = https://golang.org/dl/go1.16.src.tar.gz
md5sum = b767f7e81d886b4208874ea953db2ce3
# go1.16 needs go1.4 to bootstrap
environment-extra =
GOROOT_BOOTSTRAP=${golang14:location}
# ---- infrastructure to build Go workspaces / projects ----
......@@ -133,7 +142,7 @@ recipe = slapos.recipe.template
url = ${:_profile_base_location_}/goenv.sh.in
output = ${gowork:directory}/env.sh
depends = ${gowork.mkdir:recipe}
md5sum = f89553711ea95ad1f6727b76747a62bf
md5sum = 09c229292b341da0de933f5900de7011
[gowork.mkdir]
# NOTE do not use slapos.cookbook:mkdirectory here - if anything in software (not instance)
......
......@@ -15,6 +15,10 @@ export PS1="(`basename $X`) $PS1"
export GOCACHE=$X/cache
export GOENV=$X/goenv
# by default make go run in module-aware mode only if go.mod is present, and in GOPATH-mode otherwise.
# (we still have some GOPATH uses; TODO -> default to "on" after GOPATH-mode usage is gone)
export GO111MODULE=auto
# strip trailing : from $GOPATH, $PKG_CONFIG_PATH
GOPATH=$${GOPATH%:}
PKG_CONFIG_PATH=$${PKG_CONFIG_PATH%:}
......@@ -25,7 +25,7 @@ parts =
install =
lab.nexedi.com/nexedi/helloweb/go/...
golang = ${golang1.15:location}
golang = ${golang1.16:location}
# -*- go -*-
[helloweb-go]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment