-
Notifications
You must be signed in to change notification settings - Fork 671
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.mod] Change go
directive to 1.21
#1441
Conversation
@lmb would you mind approving the workflows? |
@mx-psi sorry, I got sidetracked! |
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.
Seems like things work! Not sure what broke originally. Mind adding some context to the commit message?
On b3432fb, the minimum supported Go version was updated to `1.21.0`. This changes the version to `1.21` so that we are using a language version. If not using toolchain, this seems to be the preferred convention in the ecosystem and golang/go. Signed-off-by: Pablo Baeyens <pablo.baeyens@datadoghq.com>
52a3d47
to
fd6c445
Compare
I amended the commit to include a more descriptive commit message :) |
So, I've figured out why I didn't do it this way from the start: it breaks toolchain forward compat. Trying to run a command inside the module with go < 1.21 doesn't work since 1.21 is not a valid toolchain. I'm not exactly sure what the consequences of that are, but overall it makes me think that the original change was the right one. |
Can you give me an example of the command you are trying to run? If it causes trouble, I surely don't want to do this on my project either! |
This is for a different repo, but the same rules apply:
I guess |
@lmb Looks like this is getting fixed upstream: golang/go@27ed85d. The fix is also being backported to Go 1.21 (golang/go/issues/67235) and Go 1.22 (golang/go/issues/67236). |
Thanks for digging this out! |
Relates to #1438
Signed-off-by: Pablo Baeyens pablo.baeyens@datadoghq.com