glide
glide copied to clipboard
Attempting to fetch "testing"
OS X 10.11.6 Glide v0.12.0 (from homebrew)
Issue:
Running glide up
produces the following output:
[INFO] Downloading dependencies. Please wait...
[INFO] --> Fetching github.com/uber-go/zap.
[INFO] --> Fetching github.com/h2non/bimg.
[INFO] --> Fetching github.com/aws/aws-sdk-go.
[INFO] --> Fetching github.com/lib/pq.
[INFO] --> Fetching github.com/rwcarlsen/goexif.
[INFO] --> Fetching github.com/onsi/gomega.
[INFO] --> Fetching github.com/onsi/ginkgo.
[INFO] --> Detected semantic version. Setting version for github.com/onsi/ginkgo to v1.2.0.
[INFO] --> Detected semantic version. Setting version for github.com/aws/aws-sdk-go to v1.4.4.
[INFO] --> Detected semantic version. Setting version for github.com/h2non/bimg to v1.0.1.
[INFO] --> Detected semantic version. Setting version for github.com/onsi/gomega to v1.0.
[INFO] Resolving imports
[INFO] --> Fetching github.com/tj/go-debug.
[INFO] --> Fetching github.com/uber-go/atomic.
[INFO] --> Fetching github.com/go-ini/ini.
[INFO] --> Fetching github.com/jmespath/go-jmespath.
[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
glide.yaml
package: <redacted>
import:
- package: github.com/aws/aws-sdk-go/aws
version: ^1.4.4
- package: github.com/h2non/bimg
version: ^1.0.1
- package: github.com/uber-go/zap
- package: github.com/rwcarlsen/goexif/exif
- package: github.com/lib/pq
testImport:
- package: github.com/onsi/ginkgo
version: ^1.2.0
- package: github.com/onsi/gomega
version: ^1.0.0
glide.lock
hash: 2cbd988d621ae91d2cdfafb0d51a199abfd592a6831dbdef3295c964cf140fec
updated: 2016-08-23T17:36:32.618793605-04:00
imports:
- name: github.com/aws/aws-sdk-go
version: 41d27747f314ab5d608a470e23f1d92bd5249b0c
subpackages:
- aws
- aws/credentials
- aws/session
- service/s3
- aws/awserr
- aws/client
- aws/corehandlers
- aws/credentials/stscreds
- aws/defaults
- aws/request
- private/endpoints
- aws/awsutil
- aws/client/metadata
- aws/signer/v4
- private/protocol
- private/protocol/restxml
- private/waiter
- service/sts
- aws/credentials/ec2rolecreds
- aws/credentials/endpointcreds
- aws/ec2metadata
- private/protocol/rest
- private/protocol/query
- private/protocol/xml/xmlutil
- private/protocol/query/queryutil
- name: github.com/go-ini/ini
version: a2610b3a793cfa7fdf0b07038068af5ddc12aba1
- name: github.com/h2non/bimg
version: 3c3d721bd2487a6fd678b329a80ba7c474b429e0
- name: github.com/jmespath/go-jmespath
version: bd40a432e4c76585ef6b72d3fd96fb9b6dc7b68d
- name: github.com/lib/pq
version: 80f8150043c80fb52dee6bc863a709cdac7ec8f8
subpackages:
- oid
- name: github.com/rwcarlsen/goexif
version: 709fab3d192d7c62f86043caff1e7e3fb0f42bd8
subpackages:
- exif
- tiff
- name: github.com/tj/go-debug
version: ff4a55a20a86994118644bbddc6a216da193cc13
- name: github.com/uber-go/atomic
version: 0c9e689d64f004564b79d9a663634756df322902
- name: github.com/uber-go/zap
version: d11d2851fcabcf03421c4dbdbc3146fc74eb1035
testImports:
- name: github.com/onsi/ginkgo
version: 462326b1628e124b23f42e87a8f2750e3c4e2d24
- name: github.com/onsi/gomega
version: a78ae492d53aad5a7a232d0d0462c14c400e3ee7
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 ?
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.