Masterminds / glide

Package Management for Golang
https://glide.sh
Other
8.16k stars 539 forks source link

Glide failing on importing a package moved to stdlib #1055

Open martinkunc opened 5 years ago

martinkunc commented 5 years ago

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.
[INFO]   --> Fetching crypto/ed25519
[WARN]   Unable to checkout crypto/ed25519
[ERROR]  Error looking for crypto/ed25519: Cannot detect VCS

Maybe similar to #935

flip40 commented 5 years ago

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 commented 5 years ago

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

martinkunc commented 5 years ago

Right, thanks. Sorry for wrong linking.