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

Support Go Modules #31

Merged
merged 1 commit into from Jan 29, 2019

Conversation

Projects
None yet
3 participants
@SamWhited
Copy link
Contributor

SamWhited commented Jan 21, 2019

Hello,

Please consider supporting Go Modules for tracking the version of the protobuf library used. There are several old issues about users having incorrect versions of the tool or how to handle versioning (eg. #26, #25, #24, #18, #10). A few of them the response was "we need an official solution before we standardize on versioning". Now that Prometheus has started using Modules, minimal support has been backported to all supported versions of Go and one older one, and they will be the default in Go 1.12 (next month sometime), I think that time may have finally come.

Note that I picked Go 1.9 as the minimum supported version because anything older than Go 1.9.7 won't read the go.mod file anyways, and the generated code appears to build under 1.9.7 just fine. I also pinned to the latest version of the protobuf library which appeared to generate the file correctly, but please let me know if there's a different version you prefer to use and I'll change the dependency.

Please consider merging this PR and then making a semver compatible tag that consumers of this library can pin to, eg. v0.0.3. Thank you for your time and consideration.

@SamWhited SamWhited force-pushed the SamWhited:support_modules branch from 3bef6a0 to 1f32209 Jan 21, 2019

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Jan 21, 2019

@simonpasquier (who converted most of the other repos to Go modules): Do you think this makes sense for this repo, too? I guess yes, but I'd better ask you.

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Jan 21, 2019

WRT version tags: I expect this repo to be graveyarded in the not too far future. Fewer and fewer repositories within the Prometheus ecosystem depend on this one, and once OpenMetrics is finalized, this will be legacy anyway. I don't expect any changes happening in this repo. It will sit around as long as it is needed for backwards compatibility.

@SamWhited

This comment has been minimized.

Copy link
Contributor Author

SamWhited commented Jan 29, 2019

Gentle ping; especially if this is going to be graveyarded soon, it would be nice to add a mod file and tag before then so people who are still using it until they move off can have a proper version to pin to. Thanks.

Show resolved Hide resolved go.mod Outdated
@simonpasquier

This comment has been minimized.

Copy link
Member

simonpasquier commented Jan 29, 2019

@SamWhited sorry for the late review, this PR fell through the cracks...

Support Go Modules
Signed-off-by: Sam Whited <sam@samwhited.com>

@SamWhited SamWhited force-pushed the SamWhited:support_modules branch from 1f32209 to 7d90ab9 Jan 29, 2019

@SamWhited

This comment has been minimized.

Copy link
Contributor Author

SamWhited commented Jan 29, 2019

Not to worry; thanks for the followup!

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Jan 29, 2019

👍 Thanks, everyone!

@beorn7 beorn7 merged commit fd36f42 into prometheus:master Jan 29, 2019

@SamWhited SamWhited deleted the SamWhited:support_modules branch Jan 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment