-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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: remove global with lib; statements in pkgs #211241
Conversation
2885d20
to
4102b77
Compare
My vscode setup seems to fail on eval a lot of bigger files, and as i dont want to continuously force push that branch i have to figure out before how to properly check on that, when the editor is lying to me. |
4102b77
to
85e0d70
Compare
85e0d70
to
b51ce61
Compare
This is great, but I would recommend to split this up into a couple of smaller PRs so that a maintainer doesn't have to commit to reviewing the whole thing to make progress. |
Is splitting it into the pkgs subfolders "enough" or more like per package? (i am okay with doing both, just asking 😄 ) |
Per package would be better - it will be easier to find in the Git history tree. But it can be harder if you don't use some form of scripted automation. Usually I do a coarse batch modification as a first pass, then I refine until it doesn't explode my computer :), list all modified files using My suggestion would be something like
|
okay. i mean i can switch the method of doing that. Currently the split (and already merged) cover about 50% of this PR. I will work on some automation, but this will then take some more time to figure that out |
closing that, as i dont have time for writing the suggested script at the moment and keeping the old state open does not make a lot sense, so i will cease on that overall topic for the moment. |
Description of changes
I read on some PRs the Feedback that the global
with lib;
statement should be avoided. As people often start by looking on other code when doing their first packages i thought its quite counter effective, that we have a lot of that usage in existing packages and new contributer later on then get told to remove that, which can get quite frustrating.Thus i spend some time in editing most of the trivial usages out of
pkgs/**
.I am not 100% sure about the large change, so i would like to gather feedback it can be merged in a this large single commit, or if this should be more splitted.
I tried to follow the rule to replace all
with lib;
withlib.
but if its for the meta attr. For meta i replaced it withmeta = with lib; {
if there was no other scoping before that. It there was other scoping i tried to follow that.There are still about 20 occurrences of global
with lib;
, if the scope does not resolve super trivial.split prs:
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes