-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat(manager/gomod): Added support for the gomod toolchain directive #27279
feat(manager/gomod): Added support for the gomod toolchain directive #27279
Conversation
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
I'll rerun against the repository to be 100% sure. |
Ran and verified! Updated the PR description to link to the new PR. |
Related to this PR, does this mean that Renovate should use the tool chain directive as the source of truth for which version of go to install/run ? |
@rarkins As far as I understand, the go-binary itself will take care of that, see https://go.dev/doc/toolchain#select |
So we'll continue installing the latest go, as we do today? Technically we install the latest matching "^[go mod directive value]" but that's the same thing as latest. |
As long as that is go 1.21+ that should be fine yes |
@kvanzuijlen do you have time to continue this? |
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.
please add the depType as suggested
Yes, I will continue with it early next week! |
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.
otherwise LGTM
@kvanzuijlen Not sure I follow the code, but need to only update the toolchain if it already exists in the go.mod, I don't think renovate should ever add it directly. |
It doesn't, it checks for a line starting with toolchain go and if it exists it extracts the version if it exists unless I'm misremembering (i'm on my phone now) |
🎉 This PR is included in version 37.283.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Changes
Added support for the go.mod toolchain directive to the gomod manager.
Context
Go 1.21 introduced the
toolchain
directive. This directive, contrary to thego
directive, should be updated by Renovate, see #24427 and #16715. Closes #24427Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: