-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
doc/python: mention sorting attribute names #96877
Conversation
But don't we have |
I did a |
Is there any practical reason behind this? I think that it's just painful to find the right position when adding a new attribute (in all-packages.nix, python-packages.nix or whatever) and any decent editor provides inline-search to jump to the proper position. |
We should probably enforce some sort of pre commit hook to make sure it's sorted? Along with maybe a CI check. |
From the perspective of the nix-cli? no
This may be hard since we would have to "sort on paragraphs, while filtering out comments". It's likely to be do-able, but some of the expressions when I was initially sorting them were hard to handle. I also thought of including this my |
I asked about the sorting itself. The entire "where do I place my attribute"-thing wouldn't be necessary without it. |
I'm not sure I understand, I sorted all of |
@Ma27 wonders if there is any value to having it sorted at all. I think its mostly a matter of preference, at least for me it is. It has happened more than once a package was in the set twice, but under a slightly different name (capitalized or not). This you would spot sooner in case of a sorted list, but its rare it happens. |
I have similar feelings. Making it easier to find packages helps with additions, modifications, and removals. The "hard work" has already been done, I just want it to be more official.
This was added under the "contributing guidelines" and I think it makes more sense if you look at the rendered document. https://github.com/NixOS/nixpkgs/blob/6bc12c461ff497f1c6bafeebca02033bea7b396b/doc/languages-frameworks/python.section.md#contributing-guidelines |
6bc12c4
to
0e981d7
Compare
I split the first bullet into two, and made the sorting word choice to be stronger. |
Some hooks mess with rebasing broken commits so I personally never activated them.
Less merge conflicts. |
0e981d7
to
1a54a61
Compare
1a54a61
to
d28aec9
Compare
I believe there was a Anyway, the ask now is, "please sort the already sorted package list". Where as before, it was, "please attempt to sort it.... it's not really sorted, but some parts are, and please just find something that is a close-enough match". I haven't heard any strong objection to this, and it has been open for months now. |
Motivation for this change
to continue the groundwork of #96850 and make it more official
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)