-
-
Notifications
You must be signed in to change notification settings - Fork 611
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
Dependencies are droped when using a combination of -r & -c in layered requirements #1041
Comments
Hello @mgab, Thanks for the perfectly described issue! It's candy to my eyes |
@atugushev: In this section, I think it would be very reasonable for users to expect This example fails if used with
Failure when installing
|
In this case |
If a constraints file is NOT specified in
Notice how the below file is different from the one generated with
This works:
Is it expected that adding |
In this workflow, yes it is. If you use |
FTR, addressed in a tracking issue #1043. |
@atugushev Thanks for the clarification! |
Thanks @atugushev and @jeevb! And sorry for the late response, I wasn't able to come back to you earlier! Reading the following discussion in the #1037 pull request I see that you managed to understand what was the problem I was trying to point at despite my silence 😄. Thanks for the perseverance and fast reaction! And yes, it seems to solve the bug! |
|
First of all, thanks a lot for developing and maintaining the package! It is a great tool!
Background
Regarding the issue, when using layered requirements (eg
test.txt
being a superset ofmain.txt
), two referencing modes are available-r
that defines requirements, and-c
that defines constraints.Including both
-r main.in
and-c main.txt
intest.in
should ensure thattest.txt
is a superset ofmain.txt
. It should produce the same results as including just-r main.txt
except by the fact that it keeps the comments indicating where indirect dependencies came from.Issue description
However, using both
-r main.in
and-c main.txt
at the same time drops some dependencies frommain.txt
that are not propagated totest.txt
.When installing
pip install -r test.txt
, the missing packages are installed anyway (they were dependencies, indeed). And in fact, the--verbose
flag of pip-tools shows that the missing packages are taken into account until the very end of the compilation process but are not included in the output.On the other hand, using only
-r main.in
does not miss any package (but does not ensure that the versions are the same).Environment Versions
Steps to replicate
To ensure reproducibility I ran this in a docker, but I was able to reproduce it elsewhere:
main.in
requirements with: -> [captured output]test.in
requirements with: -> [captured output]Expected result
Every package listed in
main.txt
and its version should appear also intest.txt
.test.txt
could include additional packages iftest.in
specified additional dependencies.This is the content of
main.txt
and the expected content oftest.txt
:Actual result
Instead,
test.txt
has less packages thanmain.txt
. The actual content oftest.txt
is:This happened with other library combinations, have not figured out the pattern yet.
As mentioned,
pip install -r test.txt
will also installsix
, and--verbose
shows that pip-tools is consideringsix
until the very end of the compilation process.The text was updated successfully, but these errors were encountered: