From b3810166c7dc5c75a5961e9c92726361a1ffc316 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Tue, 15 Sep 2020 20:45:42 +0200 Subject: [PATCH] nixos/doc: Soft deprecate types.attrs --- nixos/doc/manual/development/option-types.xml | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/nixos/doc/manual/development/option-types.xml b/nixos/doc/manual/development/option-types.xml index 5a6dae6e991..9827615349d 100644 --- a/nixos/doc/manual/development/option-types.xml +++ b/nixos/doc/manual/development/option-types.xml @@ -21,16 +21,6 @@ - - - types.attrs - - - - A free-form attribute set. - - - types.bool @@ -64,6 +54,24 @@ + + + types.attrs + + + + A free-form attribute set. + + This type will be deprecated in the future because it doesn't recurse + into attribute sets, silently drops earlier attribute definitions, and + doesn't discharge lib.mkDefault, lib.mkIf + and co. For allowing arbitrary attribute sets, prefer + types.attrsOf types.anything instead which doesn't + have these problems. + + + +