Repository navigation
go.mod: remove obsolete exclude rule - #2077
Conversation
The exclude was originally added in 02fec46 to prevent traversing client_golang v1.12.1. No current dependency requires that version, making the exclude obsolete. To verify; go list -m all which produced no changes. Also verified that: go mod tidy go test ./... produce no changes and all tests pass. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
|
Thanks. What's the motivation for this change? Just cleanup?
It's more about users who should skip this version, when updating client_golang in the past as it was broken. Not sure why Still, it's unlikely given time, but is there harm leaving? |
|
Hi! Thanks for looking!
Yes, cleanup because it's no longer needed, but also because it partially breaks the module (I'll post an example).
The exclude won't help with that; exclude helps preventing the module's own "requires" to skip the version (so that
But .. I found some time ago that, despite the documentation mentioning the directives are "ignored", they do have an effect, and make the module partially broken, because go install github.com/prometheus/client_golang/examples/simple@latest
go: github.com/prometheus/client_golang/examples/simple@latest (in github.com/prometheus/client_golang@v1.24.1):
The go.mod file for the module providing named packages contains one or
more exclude directives. It must not contain directives that would cause
it to be interpreted differently than if it were the main module.
The |
Actually; in case I misunderstood the intent; was e.g.; retract v1.12.1 // Broken release, do not use.I don't think that prevents users from installing it, but at least will provide the correct metadata, pkg.go.dev will show it as retracted;
|
bwplotka
left a comment
There was a problem hiding this comment.
No, you are right I mixed exclude with retract -- TIL that breaks install (but not go run).
Let's do this, thanks!
Same for me (well not Today but some time ago); I thought Thanks! |

relates to;
The exclude was originally added in 02fec46 to prevent traversing client_golang v1.12.1. No current dependency requires that version, making the exclude obsolete.
To verify;
which produced no changes.
Also verified that:
produce no changes and all tests pass.