Tuesday, 30 April 2019

Go and Glide - Problems with Update - Cannot detect VCS

I saw this today: -

glide update

which returns: -

[WARN] Unable to checkout crypto/tls
[ERROR] Error looking for crypto/tls: Cannot detect VCS

I'm using Glide 0.13.2, and Go versions 1.10.6 and 1.11.5.

Using the more detailed glide --debug update, I found a wee bit more detail: -

[DEBUG] ImportDir error on /Users/hayd/.glide/cache/src/https-crypto-tls: cannot find package "." in:
/Users/hayd/.glide/cache/src/https-crypto-tls

*BUT* this did lead me to look at my Git source folder -  $GOPATH/src - which, amongst other things had this: -

drwxr-xr-x   3 hayd  staff   96 29 Mar 19:31 crypto

which was a directory containing a sinmgle empty subdirectory: -

drwxr-xr-x  2 hayd  staff   64 29 Mar 19:33 tls

So this kinda tied up with the symptom shown up in the --debug trace i.e. cannot find package "." even though it was in a completely different place.

Once I did rm -Rf $GOPATH/src/crypto, the glide update worked a treat.

I'd previously gone down a rabbit hole with glide clear-cache and glide mirror, both of which were poisson rouge.

Hope this helps others in the same situation :-)

No comments:

Note to self - use kubectl to query images in a pod or deployment

In both cases, we use JSON ... For a deployment, we can do this: - kubectl get deployment foobar --namespace snafu --output jsonpath="{...