-
-
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
via lines often result in git conflict #1036
Comments
also the missing trailing slash on deps without |
I've been running into the same frustration. This is especially noticeable on Django projects that include many Django 3rd party libraries. The Django "via" line can easily extend beyond column 200. Proposed fix in #1237. If there is a single annotation, then it is rendered on one line, otherwise, one per line. |
When there is more than one "via" annotation, they are now formatted one per line. This prevents very long lines in requirements.txt output. The very long lines often scroll beyond the width of an editor, making them difficult to read. Worse, when these annotations change, diffs are hard to read as the actual difference is hidden far off to the right. By placing one annotation per line, diffs will be much more obvious. This follows the philosophy of many automatic formatters such as Black. To simplify the formatting and to make it more consistent, annotations are now always on the line after the requirement, whether hashes were generated or not. Fixes #1036
@jdufresne it looks like there's now always a missing trailing slash - this increases the chance of a merge conflict |
The final trailing slash doesn't make sense. The slash indicates "escape this newline, to continue the statement". I agree that it is unfortunate that this can lead to merge conflicts, but it is still wrong placement, IMO. For example, the text:
After expanding the newline escapes, should expand to:
Notice the first comment is on the next line. It should not expand to:
The final newline happens to work as the next line is a comment, but if someone disabled annotations ( |
What's the problem this feature will solve?
currently when adding and removing packages in multiple github PRs the
# via
line will conflictDescribe the solution you'd like
put each
# via
on a new line:instead use:
Alternative Solutions
Additional context
The text was updated successfully, but these errors were encountered: