-
Notifications
You must be signed in to change notification settings - Fork 18k
x/vgo: can't use submodules along with "parent" modules #26250
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
Comments
And the second connected issue -
It assumes cmd is in |
cc @myitcv
|
Change https://golang.org/cl/123095 mentions this issue: |
@mwf sorry, I missed you pinging me in this. Yes, I have successfully worked with submodules. Here's a simple example Given Initialise a directory as a git repo, and add an appropriate remote:
Now define our root module, at the root of the repo, commit and push:
Now create a
Now commit, tag and push our new package:
Now create a
Now let's build and run our package:
See how we resolve to the tagged version of Finally we commit, tag and push our
Version details
|
Thanks for the answer, @myitcv ! https://golang.org/cl/123095 fixed all this stuff, so it works with latest vgo and I believe it works in go tip :) |
What version of Go are you using (
go version
)?go version go1.10.3 darwin/amd64 vgo:2018-02-20.1
Latest
vgo
:What did you do?
Please refer to https://github.com/mwf/vgo-modules
I'm very sorry, but this case doesn't have standalone example, because tagging revisions and active repo usage is involved.
Let's assume we are in active development phase with versions v0.x.
At some point we decide to move some package to a standalone module, to split the dependencies and to have better semantic structure.
Thus cmd package is introduced to a separate module github.com/mwf/vgo-modules/cmd.
But it turns out you can't use both github.com/mwf/vgo-modules/cmd and github.com/mwf/vgo-modules at the same time. Have a look at example project.
What did you expect to see?
vgo get github.com/mwf/vgo-modules/cmd
should run without error and get the latestgithub.com/mwf/vgo-modules/cmd v0.0.1
What did you see instead?
The actual error is absolutely strange to me. Because formally
github.com/mwf/vgo-modules v0.0.2
doesn't containcmd
package:This is a case not only for a refactoring (like introducing new modules for existing packages), but also if you make a brand-new submodule and try to use both "parent" and the new one. The error is the same.
The text was updated successfully, but these errors were encountered: