-
Notifications
You must be signed in to change notification settings - Fork 185
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 dependencies to fix panic in go generate #326
base: main
Are you sure you want to change the base?
Conversation
This fixes the crash when go generating Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
c864d0f
to
60571b8
Compare
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.
LGTM, thanks!
go.mod
Outdated
go 1.21 | ||
go 1.22.0 | ||
|
||
toolchain go1.22.10 |
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.
You can probably remove this one if it automatically added it (go modules tends to randomly add these, but adding also means that users get either down- or upgraded when running commands, so I try to avoid adding these.
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.
Yes, I’ll remove the toolchain.
@@ -1,11 +1,16 @@ | |||
module github.com/Microsoft/go-winio | |||
|
|||
go 1.21 | |||
go 1.22.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.
Did the updated modules enforce updating to go1.22.0
, or does it accept staying on go1.21
?
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.
Yes, it needs go 1.22:
$ GOTOOLCHAIN=go1.21.0 go get golang.org/x/tools/cmd/stringer
go: golang.org/x/tools/cmd/stringer: golang.org/x/tools@v0.29.0 requires go >= 1.22.0 (running go 1.21.0; GOTOOLCHAIN=go1.21.0)
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
2019b42
to
ebe1a7d
Compare
@kiashok can you trigger the CI again? |
All right, so this effectively fixes the «CI / Go Generate» workflow. |
@mat007 #325 might not fix all the CI issues being hit here right? The interger overflow ones especially - do you want me to look into the integer overflow lint errors? Apologies that a lot of this has fallen on you. |
Thanks @kiashok ! I can look at the lint errors in that other PR, but I need some guidance on how best to approach it, see #325 (comment) But also, do we want to merge here, or cherry-pick the commits to #325? I really don’t mind either way. 😄 |
I picked Go 1.22 because I’ve seen this in another recent PR run:
Also updating
golang.org/x/tools/cmd/stringer
requires Go 1.22:Here is what I did:
then manually edited
go.mod
to remove the addedtoolchain
, and re-rango mod tidy
to make sure it’s stable.