-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
x/vgo: can't find git tag for non-root module #24840
Comments
You have a Did you intend for that? Untested, but I think you need the |
(sorry that sent early) You also need to have a |
I tried that and it didn't change anything. From original issue:
I also tried adding the root
I pushed a new lib github.com/nicksnyder/hola which demonstrates this other issue. It has a structure like this:
I pushed a commit to github.com/nicksnyder/app to create two test cases, one against Can you tell me what is supposed to work? |
My high level desire is to have a library with the following properties:
|
Apologies, I didn't read the original issue carefully enough. Now I actually think this is a duplicate of #24687 (comment) This horrendous script tries to recreate the scenario you described above. To recreate yourself:
See my versions of those three repos:
The end result is much the same:
gives
As you can see things are failing for And that's what's also going on in #24687 (comment) |
After re-reading https://research.swtch.com/vgo-module I am basically just trying to setup the second scenario depicted here. This is how github.com/nicksnyder/hola is setup. I updated github.com/nicksnyder/app because it has some unintended issues in it, and now I can reproduce the error that seems to be similar to the one you reported in the other issue:
If I then pin the module to 2.0.0 (e.g.
I think we can close this issue since the original reproduction was for a setup that was not documented to work. Instead, I am going to open a new issue with fresh reproduction steps for a setup that is supposed to work. Completely fine if you want to immediately mark it as a duplicate, but it isn't obvious to me that it is. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?What did you do?
What did you expect to see?
I expected go.mod to look like this:
What did you see instead?
Logs
Attempted workarounds
If I manually edit the go.mod file to point to v1.2.0 and run
vgo build
, I see this:Should be
https://api.github.com/repos/nicksnyder/hello/git/refs/tags/v1.2.0
not
https://api.github.com/repos/nicksnyder/hello/git/refs/tags/hello/v1.2.0
I also tried to add a
go.mod
to the root of github.com/nicksnyder/hello with justmodule = "github.com/nicksnyder/hello"
and that didn't help.More generally, what is the intended set of
go.mod
files for a project with a directory structure like this?The text was updated successfully, but these errors were encountered: