This repository has been archived by the owner on Sep 9, 2020. It is now read-only.
Allow invalid lock version to be added to the Q #986
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this do / why do we need it?
When the version from the lock is immediately discarded due to not matching the constraint, nothing is logged and it's not clear that the lock was broken, or why. Allowing it be be added to the version queue lets it be evaluated first, traced and clearly show why it wasn't used.
I originally tried to log directly in
getLockVersionIfValid
but it caused the trace to look out of order, since that is called before the top level line is printed for the package being evaluated.What should your reviewer look out for in this PR?
I don't think so.
Do you need help or clarification on anything?
I wasn't sure if there was an existing gps unit test/fixture I could piggy back on to validate this new behavior, short of testing the output in a harness test. If not, I'll add a harness test and just check the output.
Which issue(s) does this PR fix?
This is related to #939, so that at least something is logged when the lock is broken.