Skip to content

x/vgo: vgo thinks I'm outside my GOPATH #25372

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

Closed
ardan-bkennedy opened this issue May 13, 2018 · 9 comments
Closed

x/vgo: vgo thinks I'm outside my GOPATH #25372

ardan-bkennedy opened this issue May 13, 2018 · 9 comments
Milestone

Comments

@ardan-bkennedy
Copy link

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.10.2 darwin/amd64 vgo:2018-02-20.1

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOOS="darwin"
GOPATH="/Users/bill/code/go"

What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

This project is already on my machine inside the GOPATH
https://github.com/ardanlabs/gotraining

So I tried building it

$ cd $GOPATH/src/github.com/ardanlabs/gotraining
$ touch go.mod
$ vgo build

What did you expect to see?

I expected the project to build.

What did you see instead?

vgo: cannot determine module path for source directory /Users/bill/code/go/src/github.com/ardanlabs/gotraining (outside GOPATH, no import comments)
@bcmills bcmills changed the title vgo thinks I'm outside my GOPATH x/vgo: vgo thinks I'm outside my GOPATH May 13, 2018
@gopherbot gopherbot added this to the vgo milestone May 13, 2018
@OneOfOne
Copy link
Contributor

There's a workaround: echo module github.com/ardanlabs/gotraining > go.mod, however it still fails for me with #25007.

@kardianos
Copy link
Contributor

Please try cl https://golang.org/cl/111264 to see if it fixes it.

@ardan-bkennedy
Copy link
Author

Hi @kardianos. How do I go about trying CL 111264? Never done this before.

@OneOfOne
Copy link
Contributor

OneOfOne commented May 14, 2018

@ardan-bkennedy

cd $GOPATH/src/golang.org/x/vgo
git fetch https://go.googlesource.com/vgo refs/changes/64/111264/1 && git checkout FETCH_HEAD
go install

That go fetch line is from clicking the Download button on that CL page.

@kardianos
Copy link
Contributor

Go get vgo like normal. In cl click download. Then on first line in dialogue, click copy. Paste into terminal in vgo repo. Run go install to rebuild.

@ardan-bkennedy
Copy link
Author

Brilliant. That patch worked.

@kardianos
Copy link
Contributor

Sweet. Duplicate of #25176 .

@ardan-bkennedy
Copy link
Author

@kardianos what is the policy/procedure for closing this issue now?

@kardianos
Copy link
Contributor

Duplicate issues are normally closed. I was contemplating leaving this open for a bit as the original issue wasn't found when reporting.

@golang golang locked and limited conversation to collaborators May 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants