-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Use module github.com/prometheus/prometheus/v2 in go.mod
#7663
Comments
|
Prometheus is NOT following golang convention. Adding v2 would mistake people into believing that we follow Go conventions and semver from a You can go get specific commit id's or tag ids: git rev-list -n 1 v2.19.3 go get github.com/prometheus/prometheus@657ba532e42f1db8d7c77bf802378643da0d3118 |
|
Duplicate of #6048 |
|
@roidelapluie |
|
Hi Benjamin, We are happy to help you on the prometheus-developers mailing list about this matter, if you can provide us with more details there about what does not work. |
|
Use go (I believe) 1.14.x. Try and import promethues. See that it gives the following error |
|
Yes, you need to
|
|
yeah, that doesn't work. It works if you're using old golang versions(aka 1.13), but not with newer version(aka 1.14) Are you still using 1.13? |
|
I am on go 1.15. It works for me: |
|
Note that you can ignore the v1.8.2, that does not reflect the reality. |
|
Hmm, I'm majorly confused. I was in a state where I was getting the error, now I'm suddenly not? I still have some major concerns about the workaround required to be functional with go mod(especially as it's been the very strong stance of go mod that users of go mod should use major versioning in their modules, and as they've reduced workarounds to do so, like removing +incompatible to do so. https://blog.golang.org/v2-go-modules. We'll keep investigating. |
|
go mod can be a frustrating mystery sometimes :/ My apologies for some of my tone earlier. |
In order to follow golang conventions for versions you need to update the module in go.mod to be
v2.Try:
The text was updated successfully, but these errors were encountered: