golang / dep

Go dependency management tool experiment (deprecated)
https://golang.github.io/dep/
BSD 3-Clause "New" or "Revised" License
12.85k stars 1.05k forks source link

dep ensure ignore version for required project #2229

Closed zhixinwen closed 4 years ago

zhixinwen commented 4 years ago

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

dep:
 version     : v0.5.4
 build date  : 2019-09-29
 git hash    : 1f7c19e
 go version  : go1.13
 go compiler : gc
 platform    : darwin/amd64
 features    : ImportDuringSolve=false

What dep command did you run?

dep ensure -v
...
(63)  ? attempt github.com/volatiletech/sqlboiler with 7 pkgs; at least 1 versions to try
(65)      try github.com/volatiletech/sqlboiler@v3.6.1
(65)  ✓ select github.com/volatiletech/sqlboiler@v3.6.1 w/10 pkgs
...
(83)  ? revisit github.com/volatiletech/sqlboiler to add 1 pkgs
(94)    ✓ include 2 more pkgs from github.com/volatiletech/sqlboiler@v3.6.1
...

What did you expect to see?

If a package is has a version specified under constraint and it is also specified in required, then it should use the version specified by constraint.

What did you see instead?

dep installs the latest version

zhixinwen commented 4 years ago

it is working as expected, the issue is dep defaults to ^version