-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
go/build: fail to find vendors in nested projects outside GOPATH #17264
Comments
Please include the entire transcript of what didn't work. FWIW: It works for me: $ go get -u -d github.com/mcandre/mcandre/go/ddg
$ cd ~/go/src/github.com/mcandre/mcandre/go/ddg
$ go install -v .
github.com/mcandre/mcandre/go/ddg/vendor/github.com/skratchdot/open-golang/open
github.com/mcandre/mcandre/go/ddg
$ git submodule
75fb7ed4208cf72d323d7d02fd1a5964a7a9073c vendor/github.com/skratchdot/open-golang (heads/master)
$ rm -rf ~/go/pkg/darwin_amd64/github.com/mcandre
$ go build -v .
github.com/mcandre/mcandre/go/ddg/vendor/github.com/skratchdot/open-golang/open
github.com/mcandre/mcandre/go/ddg
$ cd ~/go/github.com
$ rm -rf mcandre ~/go/bin/ddg
$ go get -v github.com/mcandre/mcandre/go/ddg
github.com/mcandre/mcandre/go/ddg/vendor/github.com/skratchdot/open-golang/open
github.com/mcandre/mcandre/go/ddg
$ ls ~/go/bin/ddg
/Users/emuller/go/bin/ddg |
However, neither Trace:
|
git clone does not restore submodules. $ cd ~/go/src/github.com/mcandre
$ rm -rf mcandre
$ git clone https://github.com/mcandre/mcandre
Cloning into 'mcandre'...
remote: Counting objects: 12262, done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 12262 (delta 3), reused 0 (delta 0), pack-reused 12249
Receiving objects: 100% (12262/12262), 4.31 MiB | 601.00 KiB/s, done.
Resolving deltas: 100% (5794/5794), done.
$ git submodule init
Submodule 'go/ddg/vendor/github.com/skratchdot/open-golang' (https://github.com/skratchdot/open-golang.git) registered for path 'go/ddg/go/ddg/vendor/github.com/skratchdot/open-golang'
$ git submodule update
Cloning into '/Users/emuller/go/src/github.com/mcandre/mcandre/go/ddg/vendor/github.com/skratchdot/open-golang'...
Submodule path 'vendor/github.com/skratchdot/open-golang': checked out '75fb7ed4208cf72d323d7d02fd1a5964a7a9073c'
$ go install -v .
github.com/mcandre/mcandre/go/ddg/vendor/github.com/skratchdot/open-golang/open
github.com/mcandre/mcandre/go/ddg AFAICT, This isn't a go issue and can be closed. |
Even when I |
@mcandre with the same error(s) ? |
yes |
@mcandre Are you cloning into |
I'm not cloning into GOPATH for github.com/mcandre/mcandre, yet I don't On Fri, Sep 30, 2016 at 4:56 PM, Edward Muller [email protected]
Cheers, |
I think this is a dupe of #14566. vendor directories are currently ignored if they are not under GOPATH; that issue tracks fixing this. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.7 windows/amd64
What operating system and processor architecture are you using (
go env
)?What did you do?
I was able to successfully vendor my dependencies via git submodules in a project called https://github.com/mcandre/go-ios7crypt. However, when I try to do this in my ddg project https://github.com/mcandre/mcandre/tree/master/go/ddg, neither
go get
norgo build
work.What did you expect to see?
I expect the
go get
andgo build
commands to work for ddg, as they do for go-ios7crypt.What did you see instead?
go get
silently fails.go build
complains that it fails to find the vendored dependencies.The text was updated successfully, but these errors were encountered: