-
Notifications
You must be signed in to change notification settings - Fork 573
Support using a later patch release than what's in go.mod #481
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
Comments
Hello @perj |
Thanks for raising this @perj - this is bang on the same issue I'm seeing. Would like the option to ignore the "patch" component of a given |
I would also like to see this. Additionally, I think the docs may be wrong here:
Setting my
|
Not having .0 is valid, you just have to not depend on ANY deps that requries
Example of projects that can go mod tidy without adding .0 |
If not having .0 always works.. then this issue is less urgent. |
@bconway you can check which module you require forces upon you that .0 by
If you have no lines other than your own module name then you don't actually need that .0 |
Is that plausible in the real world, though? Your examples are all in the standard library. |
Depends what you depends on. Here's another https://github.com/go-macaron/macaron/blob/main/go.mod |
You can also bark up the chain, ask all your deps to drop .0 |
but yes if at least one fail to drop .0, you will acquire .0 |
Description:
Some packages (e.g. k8s.io/apimachinery) puts
go 1.22.0
in their go.mod file. This propogates to applications using it, which also getsgo 1.22.0
in go.mod. Setup-go will then find that exact version. I would like a flag, possibly enabled by default, to instead use the latest patch version, as long as it's greater than the one in go.mod.Justification:
Using 1.22.0 could be a security risk. Before our go.mod was changed to say go1.22.0, setup-go was using 1.22.3, now it's downgraded. We can solve this by manually setting go1.22.3, but we can't set go1.22 since that's considered lower than 1.22.0, so there's no way to say "use latest version" via go.mod right now.
Are you willing to submit a PR?
Yes, possibly, but it will probably take me a while to make it a priority.
The text was updated successfully, but these errors were encountered: