Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upmodule directive in go.mod is missing version number #5356
Comments
This comment has been minimized.
This comment has been minimized.
|
We can't (don't want to) guarantee any API stability on the |
This comment has been minimized.
This comment has been minimized.
|
I see. Indeed it would be misleading to follow SemVer in that case. |
This comment has been minimized.
This comment has been minimized.
|
I'd leave as it is now since the note would probably be hard to find for people anyway. |
simonpasquier
closed this
Mar 15, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
exklamationmark commentedMar 14, 2019
•
edited
Proposal
Hi,
I was trying to import some packages from the repos at
v2.8.0and noticed that Go module didn't resolve to the tagged version. Instead, it resolved to a pseudo-version number(
v0.0.0-20190312040920-59369491cfdf).While the hash is still correct (
59369491cfdfis tagged withv2.8.0), it took a while to understand and verify when working with Go module.The cause was the
moduledirective ingo.mod, which didn't match strategiesfor release > v2 in Go module.
This is probably not that important if we just want to build the binary. However, it can be annoying when importing packages from Prometheus.
A proper fix would probably need to have the correct major version number in
go.mod.For now, it could simply mean having
Bug Report
What did you do?
Import
github.com/prometheus/prometheus/promqlandgithub.com/prometheus/prometheus/storageat versionv2.8.0What did you expect to see?
What did you see instead? Under which circumstances?
Environment
System information:
Linux 4.15.0-46-generic x86_64
Prometheus version:
prometheus, version 2.8.0 (branch: HEAD, revision: 5936949)
Alertmanager version:
N/A
Prometheus configuration file:
N/A
Alertmanager configuration file:
N/A
Logs:
N/A