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 up
cmd/go: allow <meta> tags to override version tag prefixes for submodules #26664
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
This is working as designed: see the “Multiple-Module Repositories” section of https://research.swtch.com/vgo-module.
Perhaps we could fall back to versions without a prefix if there are no versions tagged with the prefix, but then what happens if a prefixed tag is added later? If you added the tag
Your use-case is interesting, though: you're using a
I'll leave that for @rsc to decide.
changed the title
cmd/go: submodules do not inherit the tag of the parent module
Aug 3, 2018
Sorry, but this is working as intended.
I understand why you'd want to do that, but part of the design here is to allow a single repo to contain modules at different versions. If the repo corresponds to cirello.io (as in this case), then to tag a specific version of cirello.io/errors as v1.1.8, you need to create an errors/v1.1.8 tag.
And because there is an errors/go.mod file, the module cirello.io does not contain that directory. Modules do not contain other modules.
For all but power users, you probably want to adopt the usual convention that one repo = one module. It's important for long-term evolution of code storage options that a repo can contain multiple modules, but it's almost certainly not something you want to do by default. We will be writing a doc at some point about how and how not to arrange multiple modules in a single repo.