-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 go version #1339
update go version #1339
Conversation
Noticed failing tests:
|
@@ -1,6 +1,6 @@ | |||
module github.com/gruntwork-io/terratest | |||
|
|||
go 1.19 | |||
go 1.21.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is quite unusual to have a patch version requirement in the go.mod (go 1.21.1
instead of go 1.21
).
it also means that all projects that import github.com/gruntwork-io/terratest
will need to have the same requirement, and their go.mod
file will be mutated when running go mod tidy
.
is there a specific reason for the strict requirement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, as far as I understand, the strict requirement is done by golang since the 1.21 version. Even if the go.mod file only has 1.21
, it implies that all the modules that depend on this need to have at least go 1.21.0 installed.
https://tip.golang.org/doc/toolchain#config
In regards to the add of the patch version, since 1.21 the go toolchain requires the patch version as part of the name, so to avoid issues is recommended to add the patch as part of the go.mod version
golang/go#62278
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the link. I was not aware of this change in go 1.21. But based on the discussion there, it feels like the go directive here should be go 1.21.0
, and not go 1.21.1
, which forces all modules using this one to also use go 1.21.1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I chose 1.21.1 because it was the latest version at that moment, but sure, I'll submit a PR to downgrade the version to 1.21.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR: #1349
Description
Fixes #1337.
Update Golang version to 1.21.1
TODOs
Read the Gruntwork contribution guidelines.
Release Notes (draft)
Update Golang version to 1.21.1
Added / Removed / Updated [X].