Skip to content
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

cmd/go: populate debug.Module.Sum even if build in devel mode #33533

Open
dsnet opened this issue Aug 7, 2019 · 2 comments
Open

cmd/go: populate debug.Module.Sum even if build in devel mode #33533

dsnet opened this issue Aug 7, 2019 · 2 comments
Labels
FeatureRequest help wanted modules NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@dsnet
Copy link
Member

dsnet commented Aug 7, 2019

Related to #29814

When a binary is build from within a module's source tree, the output from runtime/debug.ReadBuildInfo currently reports the module as having version (devel).
This is understandable.

However, I don't think there is technical reason why the Sum at least can't be computed.

This has usefulness when building commandline tools from the source tree, and you want to at least emit some versioning information that distinguishes one build from another build at a different commit.

\cc @bcmills

@dsnet dsnet added the modules label Aug 7, 2019
@bcmills bcmills added the NeedsFix The path to resolution is known, but the work has not been done. label Aug 7, 2019
@bcmills bcmills added this to the Go1.14 milestone Aug 7, 2019
@bcmills
Copy link
Contributor

bcmills commented Aug 7, 2019

This request seems eminently reasonable to me.

(CC @jayconrod in case he disagrees.)

@bcmills
Copy link
Contributor

bcmills commented Sep 17, 2019

This has some interplay with #33312, in that both require some command to walk the contents of main module.

@rsc rsc modified the milestones: Go1.14, Backlog Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest help wanted modules NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants