-
Notifications
You must be signed in to change notification settings - Fork 1k
Incorrect Nested Dependency Versions #1457
Comments
Can you provide the output from running If you really need to use a specific version of apimachinery, see How do I constrain a transitive dependency's version? from our FAQ for guidance on how to add an override for |
@carolynvs I updated the question to another very specific example (same issue) with some more info. Note that I did not execute |
To work around this, I have add the following to my top level imports: _ "github.com/apache/thrift/lib/go/thrift" and then added this to my [[constraint]]
name = "github.com/apache/thrift"
revision = "b2a4d4ae21c789b689dd162deb819665567f481c" The transitive dependency link you provided suggested this. However, the section is prefixed with a warning relaying that I shouldn't do this. However, this is the only workaround that I know of. |
@carolynvs any insight on this? Is this a bug or just something I'm not understanding correctly? |
Wait, your original question said that you ran The reason why I ask is that |
@carolynvs sorry that confusion was my fault (thought the issue was the same). So if this only happens with |
For init, dep preserves the constraints from the external config file (such as glide.yaml) at the root of the project, and attempts to preserve the locked revisions as well. There is an open epic (#1335) to preserve metadata from external configuration found in a dependency when solving the dependency graph. Which I believe is the feature necessary for your Until that's implemented, you can use an [[override]]
name = "github.com/apache/thrift"
version = ">=0.9.3, <0.11.0" If you need to use a specific version, I recommend I'm going to close this and recommend that you follow #1335. But please let me know if you still have questions! |
What version of
dep
are you using (dep version
)?0.3.2
What
dep
command did you run?dep init
What did you expect to see?
I have a the following dependency in my
Gopkg.toml
:The commit for this specific version contains the following in its
glide.lock
This project/commit has the following in its
glide.yaml
After running
dep ensure
, myGopkg.lock
contains the following:What did you see instead?
I am very confused as to why dep is using this revision for 2 versions:
glide.yaml
, then the revision it locked is equal to0.11.0
and not less thanglide.lock
, then the revisions are not equalOther
dep ensure -v
outputtl;dr
The text was updated successfully, but these errors were encountered: