-
Notifications
You must be signed in to change notification settings - Fork 1k
Warn when an importer cannot preserve a constraint #907
Comments
I might have some time to work on this, this coming week if there are no huge gotcha's. I assume the problem is either in init.go or all three importers? |
@djosephsen Yay! That would be very helpful if you have time. Here's some more context: Each importer calls |
Looking at it now.. So in the case of a singular un-parsable constraint in an external config file (in other words.. skipping it means we have an empty manifest/lock), how should the importer behave? Exit with an error because no constraints could be enforced? |
code better than words about code |
This is additional work for the long-term solution to #748.
When an importer tries to constrain a dependency, but for some reason the constraint isn't valid, e.g. the branch was deleted, the tag removed, currently the importer stops with an error. The user must then edit the imported config file to remove the offending data that is triggering dep to import a constraint.
Instead of immediately stopping, the importers should print a warning that it can't preserve the existing constraint. It should still lock to a revision, and infer a sane constraint based on that revision.
The text was updated successfully, but these errors were encountered: