Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go 1.18 Beta 1 released #464

Closed
atc0005 opened this issue Dec 15, 2021 · 9 comments
Closed

Go 1.18 Beta 1 released #464

atc0005 opened this issue Dec 15, 2021 · 9 comments
Assignees
Milestone

Comments

@atc0005
Copy link
Owner

atc0005 commented Dec 15, 2021

Per https://groups.google.com/g/golang-announce/c/eAjK4Oezs_A:

Hello gophers,

We have just released go1.18beta1, a beta version of Go 1.18.
It is cut from the master branch at the revision tagged go1.18beta1.

Please try your production load tests and unit tests with the new version.
Your help testing these pre-release versions is invaluable.

Report any problems using the issue tracker:
https://golang.org/issue/new

If you have Go installed already, the easiest way to try go1.18beta1
is by using the go command:
$ go install golang.org/dl/go1.18beta1@latest
$ go1.18beta1 download

You can download binary and source distributions from the usual place:
https://golang.org/dl/#go1.18beta1

To find out what has changed in Go 1.18, read the draft release notes:
https://tip.golang.org/doc/go1.18

Cheers,
Cherry and Alex for the Go Team

I expect that the new upstream Docker image will be ready sometime later today or tomorrow.

@atc0005 atc0005 added this to the Next Release milestone Dec 15, 2021
@atc0005 atc0005 self-assigned this Dec 15, 2021
atc0005 added a commit that referenced this issue Dec 15, 2021
- switch `unsable` image from `golang:1.17.5` to
  `golang:1.18beta1
- update README to indicate that the `unstable` image uses
  the latest `beta` image if available instead of only the
  latest `rc` or stable release

refs GH-464
atc0005 added a commit that referenced this issue Dec 15, 2021
- switch `unsable` image from `golang:1.17.5` to
  `golang:1.18beta1`
- update README to indicate that the `unstable` image uses
  the latest `beta` image if available instead of only the
  latest `rc` or stable release

refs GH-464
@atc0005
Copy link
Owner Author

atc0005 commented Dec 15, 2021

Getting this output when attempting to build the unstable image using the changes from 786660c:

Building unstable release
sudo docker image build \
	--pull \
	--no-cache \
	unstable/ \
	-t  registry-1.docker.io/atc0005/go-ci:go-ci-unstable \
	-t  registry-1.docker.io/atc0005/go-ci:go-ci-unstable-v0.3.40-1-g786660c \
	--label=atc0005.go-ci
Sending build context to Docker daemon  8.704kB
Step 1/13 : FROM golang:1.18beta1
1.18beta1: Pulling from library/golang
5e0b432e8ba9: Already exists 
a84cfd68b5ce: Already exists 
e8b8f2315954: Already exists 
0598fa43a7e7: Already exists 
ae9442ff4ff8: Already exists 
87112238288c: Pull complete 
9aff73cb0ae3: Pull complete 
Digest: sha256:9170772624a98006792f14f588f2678268ec851133430d652d9986fd1e25d3dc
Status: Downloaded newer image for golang:1.18beta1
 ---> da104f0b50e8
Step 2/13 : ENV GOLANGCI_LINT_VERSION="v1.43.0"
 ---> Running in 8e4773329336
Removing intermediate container 8e4773329336
 ---> 6e7798b4acc3
Step 3/13 : ENV STATICCHECK_VERSION="v0.2.2"
 ---> Running in 7966f8aa1d41
Removing intermediate container 7966f8aa1d41
 ---> 0d63a85b38e1
Step 4/13 : ENV HTTPERRORYZER_VERSION="v0.0.1"
 ---> Running in 1c5e6960b48a
Removing intermediate container 1c5e6960b48a
 ---> f4a69ef35f52
Step 5/13 : ENV STRUCTSLOP_VERSION="v0.0.6"
 ---> Running in 7be7d8fbb59d
Removing intermediate container 7be7d8fbb59d
 ---> 3b36cb53ddde
Step 6/13 : ENV TOMLL_VERSION="v1.9.4"
 ---> Running in ee27b79fcda3
Removing intermediate container ee27b79fcda3
 ---> ad31b8f47af2
Step 7/13 : ENV ERRWRAP_VERSION="v1.3.1"
 ---> Running in 7c2c1dced4bf
Removing intermediate container 7c2c1dced4bf
 ---> 353a4e60050b
Step 8/13 : ENV APT_BSDMAINUTILS_VERSION="12.1.7+nmu3"
 ---> Running in 052a3cdd262b
Removing intermediate container 052a3cdd262b
 ---> b230d0f56df7
Step 9/13 : ENV APT_TREE_VERSION="1.8.0-1+b1"
 ---> Running in 740d1bc4f690
Removing intermediate container 740d1bc4f690
 ---> 5bb4185e09a4
Step 10/13 : RUN apt-get update     && apt-get install -y --no-install-recommends     bsdmainutils=${APT_BSDMAINUTILS_VERSION}     tree=${APT_TREE_VERSION}     && apt-get clean     && rm -rf /var/lib/apt/lists/*         && go install honnef.co/go/tools/cmd/staticcheck@${STATICCHECK_VERSION}     && staticcheck --version     && curl -sSfLO https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh     && sh install.sh -b "$(go env GOPATH)/bin" ${GOLANGCI_LINT_VERSION}     && golangci-lint --version     && go install github.com/orijtech/httperroryzer/cmd/httperroryzer@${HTTPERRORYZER_VERSION}     && go install github.com/orijtech/structslop/cmd/structslop@${STRUCTSLOP_VERSION}     && go install github.com/pelletier/go-toml/cmd/tomll@${TOMLL_VERSION}     && go install github.com/fatih/errwrap@${ERRWRAP_VERSION}     && go clean -cache -modcache
 ---> Running in 4e73a85aee8f
Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:2 http://security.debian.org/debian-security bullseye-security InRelease [44.1 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [39.4 kB]
Get:4 http://deb.debian.org/debian bullseye/main amd64 Packages [8180 kB]
Get:5 http://security.debian.org/debian-security bullseye-security/main amd64 Packages [99.5 kB]
Get:6 http://deb.debian.org/debian bullseye-updates/main amd64 Packages [2592 B]
Fetched 8481 kB in 3s (3184 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  bsdextrautils ncal
Suggested packages:
  calendar whois vacation mailutils
The following NEW packages will be installed:
  bsdextrautils bsdmainutils ncal tree
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 241 kB of archives.
After this operation, 608 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 bsdextrautils amd64 2.36.1-8 [145 kB]
Get:2 http://deb.debian.org/debian bullseye/main amd64 ncal amd64 12.1.7+nmu3 [30.1 kB]
Get:3 http://deb.debian.org/debian bullseye/main amd64 bsdmainutils all 12.1.7+nmu3 [16.4 kB]
Get:4 http://deb.debian.org/debian bullseye/main amd64 tree amd64 1.8.0-1+b1 [49.6 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 241 kB in 1s (365 kB/s)
Selecting previously unselected package bsdextrautils.
(Reading database ... 15713 files and directories currently installed.)
Preparing to unpack .../bsdextrautils_2.36.1-8_amd64.deb ...
Unpacking bsdextrautils (2.36.1-8) ...
Selecting previously unselected package ncal.
Preparing to unpack .../ncal_12.1.7+nmu3_amd64.deb ...
Unpacking ncal (12.1.7+nmu3) ...
Selecting previously unselected package bsdmainutils.
Preparing to unpack .../bsdmainutils_12.1.7+nmu3_all.deb ...
Unpacking bsdmainutils (12.1.7+nmu3) ...
Selecting previously unselected package tree.
Preparing to unpack .../tree_1.8.0-1+b1_amd64.deb ...
Unpacking tree (1.8.0-1+b1) ...
Setting up bsdextrautils (2.36.1-8) ...
update-alternatives: using /usr/bin/write.ul to provide /usr/bin/write (write) in auto mode
Setting up ncal (12.1.7+nmu3) ...
Setting up bsdmainutils (12.1.7+nmu3) ...
Setting up tree (1.8.0-1+b1) ...
go: downloading honnef.co/go/tools v0.2.2
go: downloading golang.org/x/tools v0.1.0
go: downloading github.com/BurntSushi/toml v0.3.1
go: downloading golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4
go: downloading golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
go: downloading golang.org/x/mod v0.3.0
staticcheck 2021.1.2 (v0.2.2)
golangci/golangci-lint info checking GitHub for tag 'v1.43.0'
golangci/golangci-lint info found version: 1.43.0 for v1.43.0/linux/amd64
golangci/golangci-lint info installed /go/bin/golangci-lint
panic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt

goroutine 1 [running]:
github.com/go-critic/go-critic/checkers.init.9()
	github.com/go-critic/go-critic@v0.6.1/checkers/checkers.go:58 +0x4b4
The command '/bin/sh -c apt-get update     && apt-get install -y --no-install-recommends     bsdmainutils=${APT_BSDMAINUTILS_VERSION}     tree=${APT_TREE_VERSION}     && apt-get clean     && rm -rf /var/lib/apt/lists/*         && go install honnef.co/go/tools/cmd/staticcheck@${STATICCHECK_VERSION}     && staticcheck --version     && curl -sSfLO https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh     && sh install.sh -b "$(go env GOPATH)/bin" ${GOLANGCI_LINT_VERSION}     && golangci-lint --version     && go install github.com/orijtech/httperroryzer/cmd/httperroryzer@${HTTPERRORYZER_VERSION}     && go install github.com/orijtech/structslop/cmd/structslop@${STRUCTSLOP_VERSION}     && go install github.com/pelletier/go-toml/cmd/tomll@${TOMLL_VERSION}     && go install github.com/fatih/errwrap@${ERRWRAP_VERSION}     && go clean -cache -modcache' returned a non-zero code: 2
Makefile:93: recipe for target 'build' failed
make: *** [build] Error 2

@atc0005
Copy link
Owner Author

atc0005 commented Dec 15, 2021

Replicated with:

$ docker container run --rm -it golang:1.18beta1
root@d757671e93fb:/go# apt-get update \
    && apt-get install -y --no-install-recommends \
    bsdmainutils=12.1.7+nmu3 \
    tree=1.8.0-1+b1 \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/* \
    \
    && go install honnef.co/go/tools/cmd/staticcheck@v0.2.2 \
    && staticcheck --version \
    && curl -sSfLO https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \
    && sh install.sh -b "$(go env GOPATH)/bin" v1.43.0 \
    && golangci-lint --version
Get:1 http://security.debian.org/debian-security bullseye-security InRelease [44.1 kB]
Get:2 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [39.4 kB]
Get:4 http://security.debian.org/debian-security bullseye-security/main amd64 Packages [99.5 kB]
Get:5 http://deb.debian.org/debian bullseye/main amd64 Packages [8180 kB]
Get:6 http://deb.debian.org/debian bullseye-updates/main amd64 Packages [2592 B]
Fetched 8481 kB in 3s (3017 kB/s)                    
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  bsdextrautils ncal
Suggested packages:
  calendar whois vacation mailutils
The following NEW packages will be installed:
  bsdextrautils bsdmainutils ncal tree
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 241 kB of archives.
After this operation, 608 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 bsdextrautils amd64 2.36.1-8 [145 kB]
Get:2 http://deb.debian.org/debian bullseye/main amd64 ncal amd64 12.1.7+nmu3 [30.1 kB]
Get:3 http://deb.debian.org/debian bullseye/main amd64 bsdmainutils all 12.1.7+nmu3 [16.4 kB]
Get:4 http://deb.debian.org/debian bullseye/main amd64 tree amd64 1.8.0-1+b1 [49.6 kB]
Fetched 241 kB in 1s (404 kB/s)        
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package bsdextrautils.
(Reading database ... 15713 files and directories currently installed.)
Preparing to unpack .../bsdextrautils_2.36.1-8_amd64.deb ...
Unpacking bsdextrautils (2.36.1-8) ...
Selecting previously unselected package ncal.
Preparing to unpack .../ncal_12.1.7+nmu3_amd64.deb ...
Unpacking ncal (12.1.7+nmu3) ...
Selecting previously unselected package bsdmainutils.
Preparing to unpack .../bsdmainutils_12.1.7+nmu3_all.deb ...
Unpacking bsdmainutils (12.1.7+nmu3) ...
Selecting previously unselected package tree.
Preparing to unpack .../tree_1.8.0-1+b1_amd64.deb ...
Unpacking tree (1.8.0-1+b1) ...
Setting up bsdextrautils (2.36.1-8) ...
update-alternatives: using /usr/bin/write.ul to provide /usr/bin/write (write) in auto mode
Setting up ncal (12.1.7+nmu3) ...
Setting up bsdmainutils (12.1.7+nmu3) ...
Setting up tree (1.8.0-1+b1) ...
go: downloading honnef.co/go/tools v0.2.2
go: downloading golang.org/x/tools v0.1.0
go: downloading github.com/BurntSushi/toml v0.3.1
go: downloading golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4
go: downloading golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
go: downloading golang.org/x/mod v0.3.0
staticcheck 2021.1.2 (v0.2.2)
golangci/golangci-lint info checking GitHub for tag 'v1.43.0'
golangci/golangci-lint info found version: 1.43.0 for v1.43.0/linux/amd64
golangci/golangci-lint info installed /go/bin/golangci-lint
panic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt

goroutine 1 [running]:
github.com/go-critic/go-critic/checkers.init.9()
	github.com/go-critic/go-critic@v0.6.1/checkers/checkers.go:58 +0x4b4
root@d757671e93fb:/go# 

@atc0005
Copy link
Owner Author

atc0005 commented Dec 15, 2021

root@d757671e93fb:/go# nano test.go

root@d757671e93fb:/go# cat test.go
package main

import "fmt"

func main() {
	fmt.Println("Hello World")
}

root@d757671e93fb:/go# go run test.go
Hello World
root@d757671e93fb:/go# go build test.go
root@d757671e93fb:/go# ./test 
Hello World

The fmt package is definitely there.

@atc0005
Copy link
Owner Author

atc0005 commented Dec 15, 2021

Waiting on golangci/golangci-lint#2374 before going further.

@atc0005
Copy link
Owner Author

atc0005 commented Dec 15, 2021

Waiting on golangci/golangci-lint#2374 before going further.

It doesn't sound like there is interest in supporting the beta from the golangci-lint team.

@atc0005
Copy link
Owner Author

atc0005 commented Dec 21, 2021

Further conversation on go-critic/go-critic#1157.

While there isn't interest in directly supporting the Go 1.18beta1 from the golangci-lint team (which is understandable, supporting beta releases adds a support burden), the problem may be fixed upstream and indirectly resolved with a future golangci-lint release.

This issue remains blocked until that occurs.

@atc0005
Copy link
Owner Author

atc0005 commented Jan 4, 2022

Alternatively, I can try building from source instead of using the official install script.

Per https://golangci-lint.run/usage/install/#install-from-source:

go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.43.0

Might take a little longer to generate images, but should (hopefully) give more stable results? That, or perhaps fail faster if there is an incompatibility with the base image used. Might be worth using this approach specifically for the unstable image in this project, but stick with the install script for other images.

@atc0005
Copy link
Owner Author

atc0005 commented Jan 4, 2022

Mixed results when building from source and running golangci-lint v1.43.0 against an existing project I maintain.

internal/config/types.go:37:14: undeclared name: `arg` (typecheck)
	flagParser *arg.Parser `toml:"-" arg:"-"`
	            ^
internal/config/config.go:193:22: undeclared name: `arg` (typecheck)
	config.flagParser = arg.MustParse(&config.cliConfig)
	                    ^
internal/config/config.go:323:12: undeclared name: `toml` (typecheck)
	if err := toml.Unmarshal(configFileEntries, &c.fileConfig); err != nil {
	          ^
internal/config/getters.go:450:20: undeclared name: `fqdn` (typecheck)
		hostname, err := fqdn.FqdnHostname()
		                 ^
internal/config/config.go:28:2: "github.com/alexflint/go-arg" imported but not used (typecheck)
	"github.com/alexflint/go-arg"
	^
internal/config/config.go:31:2: "github.com/pelletier/go-toml" imported but not used (typecheck)
	"github.com/pelletier/go-toml"
	^
internal/config/getters.go:23:2: "github.com/Showmax/go-fqdn" imported but not used (typecheck)
	"github.com/Showmax/go-fqdn"
	^
internal/config/types.go:22:2: "github.com/alexflint/go-arg" imported but not used (typecheck)
	"github.com/alexflint/go-arg"
	^
internal/events/record.go:82:30: undeclared name: `ezproxy` (typecheck)
	SessionTerminationResults []ezproxy.TerminateUserSessionResult
	                            ^
internal/events/record.go:93:23: undeclared name: `ezproxy` (typecheck)
	terminationResults []ezproxy.TerminateUserSessionResult,
	                     ^
internal/events/record.go:25:2: "github.com/atc0005/go-ezproxy" imported but not used (typecheck)
	"github.com/atc0005/go-ezproxy"
	^
internal/files/files.go:35:21: undeclared name: `ezproxy` (typecheck)
	UserSession        ezproxy.UserSession
	                   ^
internal/files/files.go:27:2: "github.com/atc0005/go-ezproxy" imported but not used (typecheck)
	"github.com/atc0005/go-ezproxy"
	^
internal/files/log.go:28:2: "github.com/atc0005/go-ezproxy" imported but not used (typecheck)
	"github.com/atc0005/go-ezproxy"
	^

I'm not particularly optimistic about the stability of the unstable image (pun intended?).

atc0005 added a commit that referenced this issue Jan 4, 2022
- build golangci-lint from source
- split image creation into builder/final stages, copy
  Go binaries from builder stage into final

Brief testing has shown questionable results, but pushing
this out anyway to gather live feedback from live CI
tests/builds.

refs GH-464
@atc0005
Copy link
Owner Author

atc0005 commented Jan 4, 2022

Looks like work has begun in earnest on Go 1.18 compatibility support:

golangci/golangci-lint#2438

As noted in the PR description, multiple linters currently panic. It looks like the Go 1.18 beta/rc process will be a bit more bumpy than earlier Go versions (not unexpected).

atc0005 added a commit that referenced this issue Jan 4, 2022
- switch `unsable` image from `golang:1.17.5` to
  `golang:1.18beta1`
- update README to indicate that the `unstable` image uses
  the latest `beta` image if available instead of only the
  latest `rc` or stable release

refs GH-464
atc0005 added a commit that referenced this issue Jan 4, 2022
- build golangci-lint from source
- split image creation into builder/final stages, copy
  Go binaries from builder stage into final

Brief testing has shown questionable results, but pushing
this out anyway to gather live feedback from live CI
tests/builds.

refs GH-464
@atc0005 atc0005 closed this as completed Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant