Skip to content
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 --upgrade not propagating to the header #1675

Closed
jamesbraza opened this issue Aug 24, 2022 · 5 comments
Closed

pip-compile --upgrade not propagating to the header #1675

jamesbraza opened this issue Aug 24, 2022 · 5 comments
Labels
writer Related to results output writer component

Comments

@jamesbraza
Copy link

Environment Versions

  1. OS Type: macOS Big Sur v11.5.1
  2. Python version: $ python -V: 3.10.3
  3. pip version: $ pip --version: 22.2.2
  4. pip-tools version: $ pip-compile --version: 6.8.0

Steps to replicate

I use the included header command to reproduce the command run. I would like --upgrade to be propagated to the header.

Trying it out:

pip-compile --upgrade

Expected result

I expect --upgrade to propagate to the header.

#
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
#
#    pip-compile --upgrade
#
...

Actual result

It did not propagate to the header.

#
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
#
#    pip-compile
#
...
@atugushev
Copy link
Member

That's a deliberate decision, because --update is a one-off option.

@jamesbraza
Copy link
Author

In my workflow, I like having the header match the command used to produce the file for traceability. In other words, if --upgrade was part of the pip-compile invoked to produce the requirements.txt, then imo it should be reflected in the header.

To take a different perspective, I see the header silently filtering out parts of the pip-compile command as unexpected behavior.

I like pip-compile so I reported this issue, and I leave it up to you what you decide to do!

@atugushev
Copy link
Member

You can override the header with COMPILE_COMMAND env.

@AndydeCleyre
Copy link
Contributor

See also: #1461

@atugushev
Copy link
Member

I'll close this based on the above, but please let us know if it doesn't resolve your issue. Thanks!

@atugushev atugushev added the writer Related to results output writer component label Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
writer Related to results output writer component
Projects
None yet
Development

No branches or pull requests

3 participants