-
-
Notifications
You must be signed in to change notification settings - Fork 18k
various: clean up 'meta = with lib; { ... }' #442787
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
This commit was generated using: github.com:booxter/nix-clean_with-lib/fix-with-lib-in-meta@6540275
wolfgangwalther
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel confident reviewing / approving this, because I can't come up with a way to verify the exclusion list - there could be other files that are just left broken. Unfortunately nix-env -qa doesn't recurse into everything. Also the script is quite complex and hard to verify - what scares me a bit is the part where a sanity check with nixfmt is run and the change reverted if that doesn't pass. This means the transformation is not perfect - which also means there could be bad transformations that don't show up as a syntax error.
Maybe @philiptaron feels more confident about this.
|
Here's a quick draft of a tiny first step of the approach I outlined on Matrix: technowledgy/refactor-tractor#14 Most of the code in there is glue and tests for the replacement. It's a rather simple treesitter query to replace only |
|
@wolfgangwalther thanks for this. I'll take a look if I can instead contribute some rules there. |
|
First stab at using Refactor Tractor for the same goal: |
|
Gonna pursue the same via refactor-tractor: technowledgy/refactor-tractor#15 |
This commit was generated using:
github.com:booxter/nix-clean_with-lib/fix-with-lib-in-meta@6540275
Some stats from one of the recent commit hashes:
The PR was specifically crafted to hit zero rebuilds to allow for mechanical validation. You can reproduce the patch using the generation script located here.
Note to reviewers: I'm sure this PR will clash with other patches. I am happy to refresh it when someone is ready to mechanically review the PR and merge it. Let me know!
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.