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: maybe show legacy tags in pseudoversions #25898

Open
rsc opened this issue Jun 14, 2018 · 4 comments
Open

cmd/go: maybe show legacy tags in pseudoversions #25898

rsc opened this issue Jun 14, 2018 · 4 comments
Labels
modules NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Jun 14, 2018

If you do

go get foo@tag

where tag is not a proper semver tag for foo, then vgo looks up tag, resolves the commit, finds the date on the commit, and records instead of tag a pseudo-version like

v0.0.0-20180501123456-1234abcdef

I wonder if we should preserve the tag, so that the recorded version would be:

v0.0.0-20180501123456-1234abcdef-tag

This would work for branch names and legacy semver tags too, of course, so that we could have:

v0.0.0-20180501123456-1234abcdef-devbranch
v0.0.0-20180501123456-1234abcdef-v17.0.0

These would just show a little bit more information when you list your dependencies in projects not using tagged releases (or at least vgo-compatible tagged releases in the case of the legacy v17).

@rsc rsc added this to the vgo milestone Jun 14, 2018
@myitcv
Copy link
Member

myitcv commented Jul 9, 2018

Particularly useful if you're using branches during active development.

@rsc rsc modified the milestones: vgo, Go1.11 Jul 12, 2018
@rsc rsc added the modules label Jul 12, 2018
@rsc rsc changed the title x/vgo: maybe show legacy tags in pseudoversions cmd/go: maybe show legacy tags in pseudoversions Jul 12, 2018
@rsc
Copy link
Contributor Author

rsc commented Aug 10, 2018

I'm not going to do this for Go 1.11. I think it's important not to clutter the pseudo-version with non-essential information, so that there is always a single canonical form in all the things that print versions. For Go 1.12 maybe we can find a way to put it in a comment instead.

@bcmills
Copy link
Contributor

bcmills commented May 17, 2019

We could also retain the original +metadata in pseudo-versions obtained from tags that include metadata (#31713).

@tv42
Copy link

tv42 commented Jan 12, 2020

If it'll live in the version string not in a comment, note that git tags, branches etc can contain slashes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
modules NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

4 participants