summary refs log tree commit diff
diff options
context:
space:
mode:
authorSilvan Mosberger <contact@infinisil.com>2020-09-15 20:45:42 +0200
committerSilvan Mosberger <contact@infinisil.com>2020-09-15 21:01:04 +0200
commitb3810166c7dc5c75a5961e9c92726361a1ffc316 (patch)
tree7406c9aebc17abcfbb9bdfaa5ea1b894b2a745c2
parentf3bf0f173ec9b302c2613dfb6d76dc49b889f321 (diff)
downloadnixpkgs-b3810166c7dc5c75a5961e9c92726361a1ffc316.tar
nixpkgs-b3810166c7dc5c75a5961e9c92726361a1ffc316.tar.gz
nixpkgs-b3810166c7dc5c75a5961e9c92726361a1ffc316.tar.bz2
nixpkgs-b3810166c7dc5c75a5961e9c92726361a1ffc316.tar.lz
nixpkgs-b3810166c7dc5c75a5961e9c92726361a1ffc316.tar.xz
nixpkgs-b3810166c7dc5c75a5961e9c92726361a1ffc316.tar.zst
nixpkgs-b3810166c7dc5c75a5961e9c92726361a1ffc316.zip
nixos/doc: Soft deprecate types.attrs
-rw-r--r--nixos/doc/manual/development/option-types.xml28
1 files 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
@@ -23,16 +23,6 @@
   <variablelist>
    <varlistentry>
     <term>
-     <varname>types.attrs</varname>
-    </term>
-    <listitem>
-     <para>
-      A free-form attribute set.
-     </para>
-    </listitem>
-   </varlistentry>
-   <varlistentry>
-    <term>
      <varname>types.bool</varname>
     </term>
     <listitem>
@@ -64,6 +54,24 @@
      </para>
     </listitem>
    </varlistentry>
+   <varlistentry>
+    <term>
+     <varname>types.attrs</varname>
+    </term>
+    <listitem>
+     <para>
+      A free-form attribute set.
+      <warning><para>
+       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 <literal>lib.mkDefault</literal>, <literal>lib.mkIf
+       </literal> and co. For allowing arbitrary attribute sets, prefer
+       <literal>types.attrsOf types.anything</literal> instead which doesn't
+       have these problems.
+      </para></warning>
+     </para>
+    </listitem>
+   </varlistentry>
   </variablelist>
 
   <para>