-
-
Notifications
You must be signed in to change notification settings - Fork 17.6k
treewide: clean up 'meta = with' pattern #443046
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
treewide: clean up 'meta = with' pattern #443046
Conversation
|
Not sure why nixf-diagnose --auto-fix doesn't pick up a lot of unused |
I think you'll need to specify a long disable list for I wonder whether we can pin the right version of Then it would be fully reproducible, and runnable via a single flake reference - which, importantly, is outside the nixpkgs repo, which makes it much easier to use when doing the staging merges later. |
1d7df12 to
797cbf4
Compare
0c5fb39 to
aab635e
Compare
aab635e to
a521ebe
Compare
d6ab4be to
8676f84
Compare
|
Generated using Changes:
No meta changes detected. |
|
I've checked ~half of remaining pattern occurrences and all of them had a good explanation for why they were not picked up by automation (mostly just actual usage of functions from |
|
@wolfgangwalther, are we getting close to merge? I think this would be nice to land. |
|
Not quite at the top of my list, yet, but it's getting there. I certainly have not forgotten and would like to finish it off soon. |
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
8676f84 to
567e8df
Compare
|
Thank you, @booxter, for dealing with all my requests. This is great work, I'll follow through with it now.
Not doing it for 25.05 anymore, because that's close to EOL. |
@wolfgangwalther thanks a lot for support with the PR. It was a pleasure working with you on the change and I learned a lot. ❤️ |
|
Wow! This is awesome! Thank you! |

To reproduce (not tested, just the gist):
A machine with lots of cores is recommended because nixpkgs-aware variable analysis demands significant compute power to plow through all .nix files in-tree in reasonable time.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.