Join GitHub today
cmd/go: a parent module does not seem to require a child #28801
I'm not sure whether this is WAI or not, so I thought I'd open an issue in case it's not WAI.
We have a project called gax-go that accidentally has a v2 tag (from the dep days). Some of our other libraries, such as google-cloud-go, depend on this library and accept gax-go types as arguments to functions in google-cloud-go. We want to support both of our gax v1 and gax v2 users, but we also want to support go modules in gax-go.
Here's what we expected to happen:
However, we got to the part where we create a parent go.mod and then
This is very strange. The parent certainly does require the child (all parent types are aliases of child types at this point). Furthermore, the child is its own submodule AFAICT - it has its own go.mod. So, why does
Is my understanding incorrect: that a go.mod indicates a new submodule unless it's a v2, in which case there's some special relationship causing the v1 version to somehow implicitly knows about v2 (and subsequent versions, I guess?)?
Or perhaps is there user error in my order of steps?
That declaration is inconsistent: semantic import versioning requires that the module path for a module at
Yes. PTAL googleapis/gax-go#61.
Could this issue possibly be related to #28083?
If needs be, I can list a series of commands that reproduce this issue.