Open ryanfowler opened 8 years ago
I setup a test environment and am not able to reproduce this.
Can you share what your go environment looks like (e.g., go env
)? An error like this usually comes up when Glide is unable to get a proper GOPATH
.
go env:
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/ryanfowler/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.7/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.7/libexec/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/k6/mfkbnsjj1y1cqm83ypfncbtr0000gp/T/go-build615749329=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
I have encountered the same problem. glide version:
glide version v0.12.3
go env:
GOARCH="amd64"
GOBIN="/home/darkofday/.local/go1.7.1/bin"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/darkofday/.local/gopkg:/home/darkofday/program/goprj"
GORACE=""
GOROOT="/home/darkofday/.local/go1.7.1"
GOTOOLDIR="/home/darkofday/.local/go1.7.1/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build396867875=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
glide.yaml after glide init:
...
- package: gopkg.in/validator.v2
testImport:
- package: testing
glide install
...
[INFO] --> Fetching testing.
[WARN] Unable to checkout testing
[ERROR] Update failed for testing: Cannot detect VCS
[ERROR] Failed to do initial checkout of config: Cannot detect VCS
yeah,i face the same problem too...
glide version:
glide version 0.13.0-dev
go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/scofield/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/1x/2v7wmyvx24178f1kc_y3br2h0000gp/T/go-build274938095=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
error information:
[INFO] --> Fetching testing.
[WARN] Unable to checkout testing
[ERROR] Error looking for testing: Cannot detect VCS
[ERROR] Failed to retrieve a list of test dependencies: Error resolving imports
any chance 'testing' is being imported by a non-test file in your trees? (not sure that's relevant, but trying to eliminate variables)
I encountered the problem and finally solved it.
It shouldn't fetch the testing
package cause it's not a dependency so it shouldn't be in the vendor, but for some reason glide thought it was a dependency.
After cleaning my $GOPATH/src/
folder and re-initializing with glide init
, the glide.yaml
doesn't contain the - package: testing
And finally the glide up
worked fine :+1:
I solve this problem by find the testing
dir on my $GOPATH, and the testing
is a just a dir not a package, then I rename the dir, everything is fine :-)
another way: you can change your glide.yaml , add a line before "import" ------ ignore:---------- ------ -testing --------
@scofieldpeng That's right.
OS X 10.11.6 Glide v0.12.0 (from homebrew)
Issue: Running
glide up
produces the following output:glide.yaml
glide.lock
This only starting happening with version 0.12.0. I reverted back to 0.11.1 and
glide up
worked properly.Possibly related to #388 ?