twitchtv / retool

Vendoring for executables written in Go
Apache License 2.0
418 stars 22 forks source link

Doesn't seem to work if theres a go module in the same directory #59

Open DGollings opened 4 years ago

DGollings commented 4 years ago

retool add github.com/golang/protobuf/protoc-gen-go master

retool: downloading github.com/golang/protobuf/protoc-gen-go
retool: setting version for github.com/golang/protobuf/protoc-gen-go
retool: fatal err: execution error on "git checkout ": chdir mydirectorystructure/_tools/src/github.com/golang/protobuf/protoc-gen-go: no such file or directory

but ignoring or disabling go modules temporarily seems to fix it GO111MODULE=off retool add github.com/golang/protobuf/protoc-gen-go master

retool: downloading github.com/golang/protobuf/protoc-gen-go
retool: setting version for github.com/golang/protobuf/protoc-gen-go
retool: parsing revision "master"
retool: parsed as "d23c5127dc24889085f8ccea5c9d560a57a879d8"
retool: installing github.com/golang/protobuf/protoc-gen-go

also, creating a random directory and running retool works fine, only happens when a go.mod/sum file is present

Steps to reproduce:

mkdir test_retool
cd test_retool
retool add github.com/golang/protobuf/protoc-gen-go master

= error

Houndie commented 4 years ago

Retool seems to be basically incompatible with gomodules, see writeup here:

https://github.com/twitchtv/retool/issues/51#issuecomment-487229854

Not that it looks like this repo is being maintained anymore but this issue can probably be closed as a duplicate.