glide icon indicating copy to clipboard operation
glide copied to clipboard

Glide failing on importing a package moved to stdlib

Open martinkunc opened this issue 6 years ago • 3 comments

Package golang.org/x/crypto/ed25519 was moved to stdlib in go 1.13 Glide is failing on resolution regardless there is a conditional build tag in the imported library.

I am importing golang.org/x/crypto/ed25519 but glide import is failing on

[DEBUG]	Trying to open golang.org/x/crypto/ed25519 (/Users/martin.kunc/.glide/cache/src/https-golang.org-x-crypto/ed25519)
[DEBUG]	Package golang.org/x/crypto/ed25519 imports crypto/ed25519
[DEBUG]	Missing crypto/ed25519. Trying to resolve.
[0;32m[INFO]	[m--> Fetching crypto/ed25519
[0;33m[WARN]	[mUnable to checkout crypto/ed25519
[0;31m[ERROR]	[mError looking for crypto/ed25519: Cannot detect VCS

Maybe similar to #935

martinkunc avatar Jun 19 '19 12:06 martinkunc

From your initial post x/crypto, you are using go version go1.12.4.

I believe Glide is attempting to find the built-in package crypto/ed25519, which you will not have since you are not yet on go1.13+. You can solve this by telling glide not to look for the package, as you know it does not exist on your current version of go. You can also likely remove this ignore statement after moving to go1.13+ and things should work normally.

Add to glide.yaml:

ignore:
  - crypto/ed25519

flip40 avatar Jun 19 '19 20:06 flip40

Also in relation to your comment of #935, it is possible that someone needs to add it to the list of packages added to std library here for this to work properly for go1.13+: https://github.com/Masterminds/glide/blob/master/dependency/resolver.go#L967-L978

Edit: Ah, looks like you already got there 👍 #1056

flip40 avatar Jun 19 '19 21:06 flip40

Right, thanks. Sorry for wrong linking.

martinkunc avatar Jun 20 '19 06:06 martinkunc