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: install main package from arbitrary path? #24992

Closed
kybin opened this issue Apr 22, 2018 · 4 comments

Comments

@kybin
Copy link
Contributor

commented Apr 22, 2018

The old go get downloads and install the main package, so the binary is automatically created.

The behavior seems invalid now in vgo.

If I run vgo get outside of go module directory like this

$ vgo get github.com/someone/program

It raises error cannot determine module root; please create a go.mod file there

I know it is expected, but the old behavior was convenient way of install main packages.

So will it just not supported any more? Or maybe I am missing something?

@gopherbot gopherbot added this to the vgo milestone Apr 22, 2018

@myitcv

This comment has been minimized.

Copy link
Member

commented Apr 22, 2018

@kybin I think you want vgo install here

@kybin

This comment has been minimized.

Copy link
Contributor Author

commented Apr 22, 2018

@myitcv Thanks, but vgo install also not working if I run it outside of go module directory.

@myitcv

This comment has been minimized.

Copy link
Member

commented Apr 22, 2018

Sorry, I misunderstood the original post @kybin

vgo will only work within a module:

cd `mktemp -d`
export GOPATH=$PWD
echo 'module "rubbish.com/blah"' > go.mod
vgo install github.com/cespare/reflex

In the meantime you need to use the go tool to do what you want.

When the functionality of vgo is merged into the main go tool, how the go tool should behave in this situation will be well defined.

I'll close for now because this is not expected to work in vgo, and let @rsc correct anything above or re-open in case that's necessary.

@myitcv myitcv closed this Apr 22, 2018

@kybin

This comment has been minimized.

Copy link
Contributor Author

commented Apr 22, 2018

Ah, Okay. Thanks.

@golang golang locked and limited conversation to collaborators Apr 22, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.