-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
update minimum go version to go1.17 #1871
Conversation
Versions of go below go1.18 have reached EOL, but some projects may be slightly behind and still on go1.17. This patch updates the minimum Go version to go1.17, as older versions are broken in CI: Error: ../../../go/pkg/mod/github.com/kyoh86/[email protected]/config/load.go:64:9: undefined: os.ReadFile note: module requires Go 1.17 Error: Process completed with exit code 2. Signed-off-by: Sebastiaan van Stijn <[email protected]>
Thanks @thaJeztah. We're in discussion right now about dropping support for go 1.15 or not. CI is failing because of a tool we use for CI only so technically Cobra can continue to support go 1.15. Although these versions of go are EOL, it may not be cobra's place to force projects to upgrade unless we have a legitimate need to stop using these old versions. We'll get this sorted out soon. Sorry about the hassle. |
@marckhouzam this seems to be motivated by a direct dependency of cobra (github.com/inconshreveable/mousetrap), unrelated to richgo. So this is not about deprecating 1.15 but <1.17. |
I prefer not to force projects to upgrade their go version unless Cobra really needs it. Even if go 1.15 is EOL for a while, Cobra still works with it, the CI failure was due to a CI dependency not a Cobra dependency. I'll close this, but if you feel it still should be considered please reopen. |
@marckhouzam as far as I understand, since #1872 was merged, cobra does require go 1.17<, at least on Windows. However, on Windows we do test a single version, which is currenly 1.19 (see https://packages.msys2.org/base/mingw-w64-go). And the code on "others" is almost none: https://github.com/inconshreveable/mousetrap/blob/master/trap_others.go. Does golang ignore the go version specified in the dependencies (https://github.com/inconshreveable/mousetrap/blob/master/go.mod#L3)? Otherwise, building the current cobra main using go 1.16 should be failing. On the other hand, maybe mousetrap does not use any feature that forces to use go 1.16< and it is specified |
Go currently uses the version specified in the That said, Go (and other tools) may look at the go version in |
Versions of go below go1.18 have reached EOL, but some projects may be slightly behind and still on go1.17.
This patch updates the minimum Go version to go1.17, as older versions are broken in CI: