-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 "toolchain" in go.mod #24427
Comments
This is important as the new toolchain directive simplifies updating to newer Go versions for the building, while the compatibility version can stay the same. The repos that have updated the latest now fail on Go updates due to this directive being invalid. I'm using |
Please create a minimal reproduction demonstrating such a failed update so we can test against it |
Hi there, Get your discussion fixed faster by creating a minimal reproduction. This means a repository dedicated to reproducing this issue with the minimal dependencies and config possible. Before we start working on your issue we need to know exactly what's causing the current behavior. A minimal reproduction helps us with this. To get started, please read our guide on creating a minimal reproduction. We may close the discussion if you, or someone else, haven't created a minimal reproduction within two weeks. If you need more time, or are stuck, please ask for help or more time in a comment. Good luck, The Renovate team |
@rarkins can you assign this issue to me? |
🎉 This issue has been resolved in version 37.283.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This does not appear to work. Renovate still ignores the |
@database64128 please create a new discussion and minimal reproduction to demonstrate |
I can confirm, that no pr or branch is created for my reproducer repository (see original post) even though renovate scans a dependency for the toolchain. According to the dashboard the update is pending: dornimaug/renovate-golang-toolchain#2 How would one enable this to actually update the toolchain? |
See #28465. Basically I introduced a bug when changing the depType during the PR process (and thanks for the fork I used for my reproduction repository 😀) |
I can now can confirm that everything is working as expected: dornimaug/renovate-golang-toolchain#3 Thank you for implementing this feature. |
Thanks @rarkins for having a fix ready this quickly! ❤️ |
Discussed in #24419
Originally posted by dornimaug September 14, 2023
Tell us more.
Starting with Go 1.21 there is a new directive in go.mod called "toolchain", which can be used to declare the actual toolchain used to build a module in forward compatible way. See https://go.dev/blog/toolchain and https://go.dev/doc/toolchain.
This is not the same thing as the "go" directive, which Renovate already can update. But that was disabled by default in #16715 because it turned out to not be "go tools version" as originally thought but more of a compatibility statement.
The "toolchain" directive provides a way to update the go tools used to build a module transparently during the build process, without touching its compatibility statement expressed by the "go" directive or having to install any newer version of go manually in the build environment. So I think this can and even should be updated if a new version of the go tools is available and it would be useful if Renovate could perform that update.
I do not think it is able to do so now. See https://github.com/dornimaug/renovate-golang-toolchain/blob/main/go.mod#L5 for a reproducer repo.
Another discussion was started in August referencing this topic: #23824 but this ultimately was not about the "toolchain" directive at all, but the "go" directive.
Would you consider implementing toolchain updating?
The text was updated successfully, but these errors were encountered: