gom build/run can't find libs when they installed with $GO15VENDOREXPERIMENT=1
Closed this issue · 2 comments
@hnakamur @mattn
First of all, thank you for open-sourcing such a cool library! I was really happy when I found gom
supports GO15VENDOREXPERIMENT
, but here is my problem. The below is repro process.
https://github.com/achiku/sample-golang-packaging-gom
$ go version
go version go1.5.1 darwin/amd64
$ echo $GO15VENDOREXPERIMENT
1
$ go get github.com/mattn/gom
$ git clone git@github.com:achiku/sample-golang-packaging-gom.git
$ cd sample-golang-packaging-gom
$ gom install
$ find vendor -type d -maxdepth 2
vendor
vendor/github.com
vendor/github.com/fatih
vendor/github.com/mattn
vendor/github.com/shiena
vendor/pkg
vendor/pkg/darwin_amd64
$ gom run main.go # it fails
$ gom build # it fails
$ mkdir vendor/src
$ mv vendor/github.com vendor/src
$ gom run main.go
Hello, world!
$ gom build # it succeeds
Is there any reason to move vendor/src
to vendor
after building libraries installed by gom install
? (GO15VENDORINGEXPERIMENT is introduced in this pr #57) It seems like plain go build
can also search for vendor/src
if GO15VENDORINGEXPERIMENT
is on, so leaving libraries in vendor/src
seems ok to me. I'm pretty new to golang, so might be missing something important.
AFAIK, GO15VENDOREXPERIMENT only works if the sources are inside $GOPATH.
That's right... I tried exactly the same process in $GOPATH and it worked perfectly. Thanks!