-
Notifications
You must be signed in to change notification settings - Fork 1k
dep ensure ignores constraint in Gopkg.toml #1466
Comments
The way dep currently works, you have to use an |
I find this to be a very common misconception about how the |
@johanbrandhorst Agreed! It's confusing as all get out, even for me sometimes. 😀 We are evaluating if we can fix that but for now I recommend subscribing to #302 which adds a warning when you have a constraint in your manifest that will be ignored. |
That issue is exactly what I was looking for, thank you @carolynvs! |
yeah, i think this is probably the single biggest gotcha we have right now. i'd left #302 for a long, long time thinking that we could get a contributor to take care of it. but that's proved unwise. i'm just going to take care of adding the warnings, before our next release. |
also very relevant: #1124 |
I'm probably holding it wrong, so I apologize in advance for that, but I can't find documentation on how to hold it right.
I have a test repo rsc/dt1-main that imports rsc/dt1-a that imports rsc/dt1-b.
dt1-main's manifest says to use dt1-a with version = "1.0.1" (which I understand allows newer versions) and dt1-b with version "=1.0.0" (which I expected would not allow newer versions). dt1-a's manifest says to use dt1-b with version "1.0.0".
But dep ensure chooses dt1-b 1.1.0, which I'm trying to avoid because it is buggy.
I'm doing the wrong thing, to be sure. But what is the right thing? And what docs should I be reading? In particular I can't find any docs about the format of the version string.
Maybe most troubling, if I change dt1-main's Gopkg.toml to say to use dt1-b with version "=pizza", dep ensure still behaves the same way. It is like dep ensure is completely ignoring that stanza.
The text was updated successfully, but these errors were encountered: