-
-
Notifications
You must be signed in to change notification settings - Fork 615
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
Add --split-annotate option #1297
Conversation
I'm -0 on this change. I think having many multiple output formats and many CLI arguments to control them is layering complexity. The PR size may look small, but complexity comes in the form of code, tests, and help requests. New features must now consider multiple output formatting paths. So, I prefer to be a bit opinionated in the formatting so long as the output is correct, informative, and useful. If for some reason we must include a new argument to control the output format, I think we should move towards the new expanded annotations as the default. So I'd like to see some warning in the documentation and in the console that instructs users to use |
I'm also against this for the same reasons that @jdufresne notes. As he noted in this comment the rendered requirements.txt file should not be considered a stable format, beyond being a valid file for |
Chiming in from a third-party tooling perspective. Dependabot creates automated pull requests with dependency updates and whenever these formats change the format that users generate when running the tool locally might be different from what is generated by Dependabot. Suddenly receiving a different format is surprising and at worst a breaking change when you haven't explicitly asked for it. The cli version you use might also have existing workflow dependencies that make that upgrade hard. We have historically had a grace period for upgrading major package mangers versions in Dependabot where we run both and switch at runtime based on the lockfile format. |
For now, I'm just removing the comments altogether. Not ideal, but we need to be pragmatic.
|
In addition to breaking existing methods of working with the output, and furthering this project from one of its strengths as a line-oriented tool, I am against the new multi-line annotation style because I can see drastically less information on my monitor at once now. EDIT: Please, think of those of us with small screens. |
Maybe this could be made more future-proof as
or similar? |
Please seriously consider this or a similar PR to (optionally) revert back to single-line per package formatting. The new format makes simple commandline operations like using
vs old:
|
Or you could use |
I believe the point was not in finding the dependency itself, but finding which packages use the dependency. |
Then it's |
Which would produce following with the new format 👀
|
Right, this can be done with
It's probably possible with grep as well, but it seems the multiline flag is non standard. One can also use python's Anyway the point is not that we should retain an old format just because one regex stopped working. |
i am not here to argue. your project, your decision. from my point of view you just removed a key feature (easy way to find packages and packages depending on one another using simple tooling) to gain some nicer formatting, that could have been achieved by configuring line-breaks in an editor. that is unfortunate. thank you for providing the ridiculous regex to still somewhat achieve my use case. |
For me the new impractical use of space is such a regression that I will (poorly) maintain a fork of this project if this isn't fixed in the main repo. I searched but did not find an existing issue tracking this -- is there one? |
OK, I've made #1306 to track the request. |
@fdemmer , |
I just want to invite folks here to check out alternative PR #1477, and provide feedback so we can nail this down. Thanks! |
Add --split-annotate option to pip-compile to allow annotations to be formatted one per line
This is a partial revert of #1237 to restore the default behavior up to 5.4.0
(this is currently a WIP: I need to update tests)
Contributor checklist