Fix duplicate local dependencies in pip install command #255
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.
Summary
Problem
When multiple projects reference the same local dependency through
local_dependencies:in theirrequirements.yaml, the dependency was being added multiple times to the pip install command. This was observed in CI wherethird_party/cypressappeared 9 times in a single pip install command.Root Cause
The deduplication logic in
_install_commandfunction was flawed:installable_setfrom existing packageslocal_dependencies.values()Solution
Updated the deduplication logic to maintain the
installable_setas dependencies are added:Test Plan
test_no_duplicate_local_dependencies_in_install_commandthat reproduces the issueRelated Issues
📚 Documentation preview 📚: https://unidep--255.org.readthedocs.build/en/255/