lib/deprecated: print deprecation warning for mapAttrsFlatten

This commit is contained in:
Ivan Trubach 2024-07-24 13:01:58 +03:00
parent 7919709a23
commit b9c51260d0
2 changed files with 4 additions and 2 deletions

View File

@ -29,6 +29,7 @@ let
nameValuePair nameValuePair
tail tail
toList toList
warn
; ;
inherit (lib.attrsets) removeAttrs mapAttrsToList; inherit (lib.attrsets) removeAttrs mapAttrsToList;
@ -212,8 +213,7 @@ let
else closePropagationSlow; else closePropagationSlow;
# calls a function (f attr value ) for each record item. returns a list # calls a function (f attr value ) for each record item. returns a list
# Renamed to lib.attrsets.mapAttrsToList. mapAttrsFlatten = warn "lib.misc.mapAttrsFlatten is deprecated, please use lib.attrsets.mapAttrsToList instead." mapAttrsToList;
mapAttrsFlatten = mapAttrsToList;
# attribute set containing one attribute # attribute set containing one attribute
nvs = name: value: listToAttrs [ (nameValuePair name value) ]; nvs = name: value: listToAttrs [ (nameValuePair name value) ];

View File

@ -240,6 +240,8 @@
- [`lib.options.mkPackageOptionMD`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.options.mkPackageOptionMD) is now obsolete; use the identical [`lib.options.mkPackageOption`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.options.mkPackageOption) instead. - [`lib.options.mkPackageOptionMD`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.options.mkPackageOptionMD) is now obsolete; use the identical [`lib.options.mkPackageOption`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.options.mkPackageOption) instead.
- `lib.misc.mapAttrsFlatten` is now formally deprecated and will be removed in future releases; use the identical [`lib.attrsets.mapAttrsToList`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.attrsets.mapAttrsToList) instead.
- `nixosTests` now provide a working IPv6 setup for VLAN 1 by default. - `nixosTests` now provide a working IPv6 setup for VLAN 1 by default.
- To facilitate dependency injection, the `imgui` package now builds a static archive using vcpkg' CMake rules. - To facilitate dependency injection, the `imgui` package now builds a static archive using vcpkg' CMake rules.