[gomod]: Go version of go directive without patch version is updated to with patch version #27106
Replies: 4 comments 5 replies
-
Go itself now specifies the full version of Go in go.mod when you run a command like "go mod init". Do you have a functional objection to Renovate's behavior or is this a cosmetic objection? |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
I'm still not sure if we want to do this, so not converting to an issue unless information comes up to change my mind. For example the proposed approach would mean that we never use a precise value for the go mod directive, yet Go defaults to precise now, so every single project started from now on will have precise versions. Next challenge is that our "bump" rangeStrategy always bumps to a version, not a minor range, so technically speaking we'd need to figure that out too. |
Beta Was this translation helpful? Give feedback.
-
I'm getting unconfident this proposal is reasonable. Let me withdraw this discussion now. As a library provider most of us will keep supporting the latest two language versions, which means we don't update the directive to the latest language version. As a standalone web server developer, we'll specify the latest released version, likely synced with the building base image. Updating the toolchain directive is still reasonable, but is tracked by #24427. |
Beta Was this translation helpful? Give feedback.
-
How are you running Renovate?
Self-hosted Renovate
If you're self-hosting Renovate, tell us what version of Renovate you run.
40.0.2
If you're self-hosting Renovate, select which platform you are using.
github.com
Was this something which used to work for you, and then stopped?
I have not seen this working
Describe the problem
Description
Renovate can update the Go version of the
go
directive ingo.mod
. However, it changes the version specification to the version with patch.For example, when specifying
go 1.21
as the minimum requirements, and I would expect Renovate updates togo 1.22
, however it actually updates togo 1.22.0
.There is no language changes between the patch versions in Go, so I don't want to specify the patch version in the directive, to support those how uses a bit older versions.
It's good that it supports updating the patch versions (
1.21.7
->1.22.0
), but it should not force us to specify it.Example
go.mod
renovate.json5
Renovate update
Minimal Reproduction
Pull Request: itchyny/renovate-reproduction-go-mod-directive#1
Renovate runs: https://github.com/itchyny/renovate-reproduction-go-mod-directive/actions/runs/7812266287
Relevant debug logs
Logs
Have you created a minimal reproduction repository?
I have linked to a minimal reproduction in the description above
Beta Was this translation helpful? Give feedback.
All reactions