-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
lib.modules.doRename: Add condition parameter #285612
Conversation
This is to support single-to-multi service migrations, so that the `to` (e.g. `foos.""`) isn't defined unconditionally. See test cases.
65b60c5
to
29c7665
Compare
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.
Overall looking good!
@@ -1256,7 +1256,7 @@ let | |||
(opt.highestPrio or defaultOverridePriority) | |||
(f opt.value); | |||
|
|||
doRename = { from, to, visible, warn, use, withPriority ? true }: | |||
doRename = { from, to, visible, warn, use, withPriority ? true, condition ? true }: |
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.
We don't have any docs for this function, but at least an inline comment here would be good
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.
Thanks! Here's the follow-up:
I don't think these are rendered yet, but this at least provides the content. Follow-up to NixOS#285612
I don't think these are rendered yet, but this at least provides the content. Follow-up to NixOS#285612
Successfully created backport PR for |
I don't think these are rendered yet, but this at least provides the content. Follow-up to NixOS#285612
I don't think these are rendered yet, but this at least provides the content. Follow-up to NixOS/nixpkgs#285612
I don't think these are rendered yet, but this at least provides the content. Follow-up to NixOS#285612
I don't think these are rendered yet, but this at least provides the content. Follow-up to NixOS/nixpkgs#285612
Description of changes
This is to support single-to-multi service migrations, so that the
to
(e.g.foos.""
) isn't defined unconditionally. See test cases.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.