Masterminds / glide

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

"cannot detect VCS" is misleading (when source code does not import package) #1031

Open KantarBruceAdams opened 5 years ago

KantarBruceAdams commented 5 years ago

I noticed that both glide get and glide install (when using a copy of a working gllide.yaml) failed with:

[ERROR] Error looking for : Cannot detect VCS [ERROR] Failed to retrieve a list of dependencies: Error resolving imports

The cause was that the source code did not import the package yet. You typically focus on the first error message read. The "Cannot detect VCS" part of the error is misleading. This might also be the cause of some other issue reports e.g. https://github.com/Masterminds/glide/issues/523 https://github.com/Masterminds/glide/issues/886

KantarBruceAdams commented 5 years ago

I am mistaken the cause was actually that I had a bad line in my go source

import "testify"

rather than

import "github.com/stretchr/testify"

I'm not sure why that should confuse glide

Rambatino commented 5 years ago

Probs should close this...

KantarBruceAdams commented 5 years ago

Only if you've fixed the issue :)

I moved on to go11 modules some time back myself.