Skip to content

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

Open
@rsc

Description

@rsc

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    GoCommandcmd/goNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.modules

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions