mattn/gom

'gom install' failed on Go 1.6 with GO15VENDOREXPERIMENT=0

syohex opened this issue · 11 comments

% go version
go version go1.6.3 linux/amd64
% echo $GO15VENDOREXPERIMENT
0
% gom install
downloading github.com/mattn/gover
downloading github.com/hashicorp/go-version
downloading github.com/daviddengcn/go-colortext
gom:  open /home/syohei/go/src/github.com/mattn/gom/_vendor/src: no such file or directory
% echo $?
1

This was introduced by a2d4742

mattn commented

Could you please once remove _vendor?

issue84

Could you please once remove vendor

I still get error even if _vendor is removed.

% ls
exec.go       gen.go       Gomfile     gomfile_test.go  main.go  README.mkd
exec_test.go  gen_test.go  gomfile.go  install.go       misc/
% ls -l _vendor
ls: cannot access '_vendor': No such file or directory
% export GO15VENDOREXPERIMENT=0
% ag GO15VENDOREXPERIMENT # I didn't typo
main.go
87:		return os.Getenv("GO15VENDOREXPERIMENT") == "1"
89:		return os.Getenv("GO15VENDOREXPERIMENT") != "0"
% gom install
downloading github.com/mattn/gover
downloading github.com/hashicorp/go-version
downloading github.com/daviddengcn/go-colortext
gom:  open /home/syohei/go/src/github.com/mattn/gom/_vendor/src: no such file or directory

Did you set GO15VENDOREXPERIMENT=0 ?

In this environment, moveSrcToVendor is called twice at this line and this line

mattn commented

Yes, moveSrcToVendor is called after build/install.

mattn commented

But your gom command (I don't know the version of gom) may be do it because behavior moveSrcToVendor was changed in few days ago.

I use latest gom.

In this environment, moveSrcToVendor is called twice at this line and this line

Before first moveSrcToVendor call
% ls _vendor
bin/  pkg/  src/
After first moveSrcToVendor call
% ls _vendor
bin/  github.com/  pkg/
Before second moveSrcToVendor call
% ls _vendor
bin/  github.com/  pkg/

_vendor/src is already moved, so second moveSrcToVendor is falied.

mattn commented

What do you mean second?

When gom install,

  1. move _vendor/github.com to _vendor/src (moveSrcToVendorSrc)
  2. go get
  3. move _vendor/src/* to _vendor/ (moveSrcToVendor )

Sorry for confused. Second means moveSrcToVendor at this point(

gom/install.go

Line 568 in a2d4742

err = moveSrcToVendor(vendor)
). (first call is here(

gom/install.go

Line 316 in a2d4742

err = moveSrcToVendor(vendor)
)

mattn commented

could you please update gom?

Error is gone. Thanks.