-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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/deprecated: alias mapAttrsFlatten to mapAttrsToList #328381
Conversation
These functions have identical implementation except for argument names.
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.
This looks right to me, given https://noogle.dev/f/lib/mapAttrsToList. I take no position on the warnIf.
@@ -223,7 +223,7 @@ in | |||
|
|||
config = mkIf (cfg.servers != { }) { | |||
|
|||
systemd.services = (listToAttrs (mapAttrsFlatten (name: value: nameValuePair "openvpn-${name}" (makeOpenVPNJob value name)) cfg.servers)) | |||
systemd.services = (listToAttrs (mapAttrsToList (name: value: nameValuePair "openvpn-${name}" (makeOpenVPNJob value name)) cfg.servers)) |
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.
Pulled in because of a top-level with
statement 😿
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.
Welp 🤷
See also #208242
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.
See also who it's assigned to. 😉
@philiptaron, are we waiting for a review from @infinisil (ping :]) before merging? |
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 think a lib.warn
would be best! (We'd only need a lib.warnIf (isInOldestRelease 2411)
if the replacement were introduced in the same change)
@infinisil, done. I’ve used |
Ah no we really just need an unconditional |
Specifically |
Ah, sorry, misunderstood your suggestion. |
@infinisil, changed to |
Description of changes
These functions have identical implementation except for argument names.
This PR also updates usage in Nixpkgs.
mapAttrsFlatten:
nixpkgs/lib/deprecated/misc.nix
Lines 214 to 215 in b281753
mapAttrsToList:
nixpkgs/lib/attrsets.nix
Lines 1093 to 1096 in b281753
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.