-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
lib/attrsets: remove copies of recurseIntoAttrs, add recurseIntoAttrsIf #367489
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: lucasew <[email protected]>
…Attrs and dontRecurseIntoAttrs Signed-off-by: lucasew <[email protected]>
34fb292
to
1e5e58a
Compare
I don't get the motivation behind this change, can you explain it more? |
I want to parametrize whether some kind of builder would recurse into a attrset based on a condition and found this low hanging fruit while I was looking for a way to do it. |
BTW the review bot is running now a test that will result in less messages sent. Basically a map reduce that waits the workers to be done then send all their Currently is just a |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/4995 |
I would expect this to behave as rec {
/** Apply a function if the condition holds; return argument unmodified otherwise. */
applyIf = cond: f: if cond then f else (x: x);
recurseIntoAttrsIf = cond: applyIf cond recurseIntoAttrs;
} With |
I actually wanted a way to enable nixpkgs-review to at least find which tests changed the derivation path but it seems it needs a little of preparation. The idea is to pass a type of parameter to nixpkgs and then it would eval tests recursively.
I am not dealing with NixOS tests mapping yet, only a low hanging fruit I found while looking for a way to do it.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.