fix: invalidate lock file when an inline package definition changes#6529
Draft
Hofer-Julian wants to merge 1 commit into
Draft
fix: invalidate lock file when an inline package definition changes#6529Hofer-Julian wants to merge 1 commit into
Hofer-Julian wants to merge 1 commit into
Conversation
The satisfiability check trusted locked source records with immutable (git or url pinned) sources without consulting the consuming manifest. An inline package definition lives in that manifest, so adding or editing fields like host-dependencies or run-dependencies there kept reporting the lock file as up-to-date and the new dependencies never resolved. Recompute the record's identifier hash with the content hash of the inline definition currently in the manifest and force a re-lock on mismatch. This requires hashing the build and host package sets order-insensitively, because the lock file normalizes the order of those references and the solve-time order is not reproducible after a round trip. Fixes prefix-dev#6527
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
The satisfiability check trusted locked source records with immutable (git or url pinned) sources without consulting the consuming manifest. An inline package definition lives in that manifest, so adding or editing fields like host-dependencies or run-dependencies there kept reporting the lock file as up-to-date and the new dependencies never resolved.
Recompute the record's identifier hash with the content hash of the inline definition currently in the manifest and force a re-lock on mismatch. This requires hashing the build and host package sets order-insensitively, because the lock file normalizes the order of those references and the solve-time order is not reproducible after a round trip.
Fixes #6527
How Has This Been Tested?
Local tests
AI Disclosure
Tools: Claude
Checklist:
schema/model.py.