-
-
Notifications
You must be signed in to change notification settings - Fork 16.5k
treewide: remove disabled = pythonOlder
where it's matching only removed Python
#426616
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
Conversation
disabled = pythonOlder
where it's matching only versions removed from Nixpkgsdisabled = pythonOlder
where it's matching only removed Python
f976bcb
to
42221ee
Compare
77cce8d
to
e007f7f
Compare
2e8998a
to
f91f387
Compare
e65c874
to
20a2e4f
Compare
Cleaned up with ```sh git diff --name-only staging | xargs -n 1 -P 0 deadnix -eq ``` Only files with `pythonOlder` removed selected by ```nix git diff -G 'pythonOlder' --name-only | xargs git add ``` Manual interventions: - top-level/python-packages.nix: Qt packages used `pythonOlder` in `callPackage` calls
This one required two windows: - in one, i ran `git diff staging` and searched for the comments with this regex: ^\s*# (god bless Less) - in another, i opened an editor and removed those lines
2d6111d
to
34ba803
Compare
Maybe worth mentioned a old attempt, that was cancelled: From fabaff:
|
At this stage it would be great to get some feedback from @mweinelt and @natsukium on whether the change in this PR is wanted in general. |
and whether the PR itself is wanted |
Ight, @Sigmanificient @wolfgangwalther @fabaff (maybe also @GaetanLepage), what's yall's verdict on this: worth keeping or not? |
From my perspective, this is certainly worth doing / keeping - but I feel like I lack the knowledge to tell why these conditions are there in the first place. If they are essentially similar to |
yes, sorta: when a disabled package is evaluated, it errors with "PACKAGE doesn't support Python PYTHONVERSION", except it's Python-specific and is thus a top-level attr instead of meta one |
I am in favor of such a change. I don't think we are missing much of getting rid of these evaluation guard rails in practice. Let's wait for a definitive answer from the official nixpkgs python maintainers. |
Yes, we want structural clean-up. However, I think everything beyond a single atomic commit per operation (remove obsolete pythonOlder, replace negated pythonOlder) would be too noisy. And given that this is an operation we need to repeat, I think creating a script for the complete workflow would be the way to go. |
I agree, making this repeatable seems very useful. Should be run whenever a python version is dropped. |
what if there's multiple versions mentioned, translated from, say, |
I'd say the script should not worry about 100% perfection, but about doing the biggest chunk of work possible, and reliably and reviewable so. You can still grep for these kind of things and fix them manually. |
For a script, also consider #427098, which introduces ast-grep support - I think this would be a perfect use-case for something like that. It's even possible to write tests for that script this way. |
mkay then, I'll try to write a script and then remake this PR with it |
Nah, i lost motivation, sorry for bothering yall 🙏 |
I'm sorry to hear that |
Commands used (also can be reproduced with):
replacing
10
with numbers from 0 to 9.Sadly, can't mass-test it with
nixpkgs-review
, but occasional builds do succeed.Cleanup steps are described in the commits themselves.
Things done
passthru.tests
.nixpkgs-review
on this PR. See nixpkgs-review usage../result/bin/
.Add a 👍 reaction to pull requests you find important.