dep init fails with error due to underscore in source path

Created on 15 Feb 2018  路  5Comments  路  Source: golang/dep

What version of dep are you using (dep version)?

v0.4.1-61-g1dc2d8b6

What dep command did you run?

dep init -v
Getting direct dependencies...
Checked 0 directories for packages.
Found 0 direct dependencies.
init failed: validation of solve parameters failed: validateParams: at least one package must be present in the PackageTree

dep hash-inputs
could not find project Gopkg.toml, use dep init to initiate a manifest

What did you expect to see?

Expected dep init to product vendor folder and accompanying files.

What did you see instead?

init failed: validation of solve parameters failed: validateParams: at least one package must be present in the PackageTree

Most helpful comment

Getting the same error. It seems to happen because I have _ in my path:

  • $GOPATH/src/bitbucket.org/m1kola/repo_name - works
  • $GOPATH/src/bitbucket.org/_m1kola/repo_name - doesn't work
dep version
dep:
 version     : v0.4.1
 build date  : 2018-01-24
 git hash    : 37d9ea0a
 go version  : go1.9.1
 go compiler : gc
 platform    : darwin/amd64

Same happens in the master branch.

All 5 comments

Getting the same error. It seems to happen because I have _ in my path:

  • $GOPATH/src/bitbucket.org/m1kola/repo_name - works
  • $GOPATH/src/bitbucket.org/_m1kola/repo_name - doesn't work
dep version
dep:
 version     : v0.4.1
 build date  : 2018-01-24
 git hash    : 37d9ea0a
 go version  : go1.9.1
 go compiler : gc
 platform    : darwin/amd64

Same happens in the master branch.

Good find. I also have underscores in my GOPATH.

I am using visual studio online and when you generate a git repository it adds /_git/ to the URL path. I have confirmed when the _git does not exists that dep works as expected.

Checked today - faced the same issue. Used the latest development sources (version: devel).

Dep was officially deprecated earlier this year, and the proposal to archive this repository was accepted. As such, I'm closing outstanding issues before archiving the repository. For any further comments, please use the proposal thread on the Go issue tracker. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wallrj picture wallrj  路  27Comments

sttts picture sttts  路  25Comments

mastoj picture mastoj  路  29Comments

sdboyer picture sdboyer  路  26Comments

bradleyfalzon picture bradleyfalzon  路  52Comments