-
Notifications
You must be signed in to change notification settings - Fork 1k
Why did dep not used my imported version? #939
Comments
that is indeed odd - i would've expected to see it up at the top. the first thing i'd check is that it is, indeed, actually making it into the |
Thanks! I'll try that. |
@sdboyer Okay here is what is happening:
From the code perspective I get what happened, though we should at least logged something in this case, as otherwise that's a pretty sneaky thing for gps to do. 😀 I'm going to add an issue for that in a minute. From a human perspective, when I have a constraint like Do we want dep to stick with this current behavior, essentially seriously making it hard for someone to lock to an untagged revision while still trying to use semver in the manifest? In the distant future maybe that's not a huge deal when more things are properly tagged, but right now, that would quickly convince me to stop using semver, and go back to constraining to just master. Obviously I prefer that dep be a bit looser about revisions matching semver constraints... What do you think? |
Just adding this here so that I don't forget. 😊 If we end up not changing gps's behavior, the importers all need to stop turning strings like |
crap. sorry, i missed this, my bad. maybe we can find a nice middle ground - if the semver value that comes back has prerelease data on it (which i believe is how these suffixes get interpreted), then we just drop the constraint. would that cover our problems? |
I think that unless the revision that they are currently locked to is tagged, we shouldn't add a semver constraint during import. If they are currently on a prerelease version, then it should be safe to add a constraint, for example every moby release is now a prerelease thanks for their creative CE versioning scheme, e.g. |
sure, ok - that's probably easier and less complex. and that's really worth doing, given that it was trying to be perhaps a bit too smart that got us into this in the first place 😉 let's just make sure that we've got some pretty exhaustive tests for the possible combinations! |
Working on this today and as part of it, all the logic for the importers is going to be consolidated into a single function. That way importers only deal with the config parsing, and none of the logic about converting rando strings to locks/constraints is handled individually in each importer. |
Warning: I am testing dep out on Kuberentes, and am using a few fixes to the godep config file to get this far.
go version: go version go1.8.3 darwin/amd64
dep version: v0.2.1-1-ga085554 ( PR #938 )
The dependency on
cloud.google.com/go
was for0.1.0-115-g3b1ae45
, specifically the untagged revision3b1ae45
. After running dep init and importing the config from godep, that preferred/imported revision was ignored during solve. Or at least that's the way it looks.I was expecting to see a line like this instead:
It's not clear from the output why the revision wasn't considered before those other versions? Is it because the constraint is for a version and not a branch?
The text was updated successfully, but these errors were encountered: