-
-
Notifications
You must be signed in to change notification settings - Fork 612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pip-compile is non-deterministic with multiple declarations of a dependency specifying extras #1451
Comments
I notice in the EDIT: Those don't seem to be relevant anyway. |
Thanks @AndydeCleyre . I'll try to take a look later this week. |
@AndydeCleyre I put up #1486 for review. |
Since pip-tools 5.1.2 (c0b33e7), running
pip-compile
against arequirements.in
where there are multiple declarations of a dependency with different extras, the resultingrequirements.txt
will be a non-deterministic choice between the resolved dependencies of the different declared sets of extras.Attached to this issue is both a tar file with a minimal reproduction of the issue as well as a log demonstrating reproduction of the issue with the attached example.
Minimal Reproduction
Log demonstrating reproduction of the issue
Environment Versions
Python 3.7.0
pip 21.1.3 from /Users/MBP-CChapline/workspace/bug-repro/venv/lib/python3.7/site-packages/pip (python 3.7)
pip-compile, version 6.2.0
Steps to replicate
This is a minimal reproduction of the issue:
common-package
folder with asetup.py
that declares 2 extras with different dependencies:requirements-second.in
like so:requirements-main.in
like so:pip-compile requirements-main.in
repeatedly and observe the outputted requirement sets.Expected result
The expected result is that the final requirement set generated by
pip-compile
will include the union of the extras declared throughout includedrequirements.in
files. So for the above example, it would be expected that the generatedrequirements.txt
would include bothrequests
(fromextra1
) andtyping
(Fromextra2
).Actual result
The actual result is that the resulting set of dependencies is a non-deterministic choice between the different declarations of the
common-package[<extras>]
dependency. The collapsed details below show example output of this occurring.Example non-deterministic output
Additional details:
This issue appears to have been introduced in version 5.1.2 of pip-tools, specifically in commit c0b33e7. During our debugging of this issue, it appears that the patch collapsed below may solve the immediate issue, but we're unsure if it could cause other regressions in pip-compile.
Potential patch
A PR with the above change has been opened as #1452 😊 .
The text was updated successfully, but these errors were encountered: