Skip to content
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: vgo thinks I'm outside my GOPATH #25372

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

Comments

@ardan-bkennedy
Copy link

commented May 13, 2018

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

This comment has been minimized.

Copy link
Contributor

commented May 14, 2018

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

@kardianos

This comment has been minimized.

Copy link
Contributor

commented May 14, 2018

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

@ardan-bkennedy

This comment has been minimized.

Copy link
Author

commented May 14, 2018

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

@OneOfOne

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor

commented May 14, 2018

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

This comment has been minimized.

Copy link
Author

commented May 14, 2018

Brilliant. That patch worked.

@kardianos

This comment has been minimized.

Copy link
Contributor

commented May 14, 2018

Sweet. Duplicate of #25176 .

@ardan-bkennedy

This comment has been minimized.

Copy link
Author

commented May 14, 2018

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

@kardianos

This comment has been minimized.

Copy link
Contributor

commented May 14, 2018

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

@kardianos kardianos closed this May 15, 2018

@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
4 participants
You can’t perform that action at this time.