From 772b8869d28e9901370277ff3ba82c1d912482ef Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Wed, 7 May 2014 16:43:18 -0400 Subject: [PATCH] Add comment about limitation on __internal.check --- lib/modules.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/modules.nix b/lib/modules.nix index 26193b26941..9ed2917df50 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -61,6 +61,10 @@ rec { # Traverse options and extract the option values into the final # config set. At the same time, check whether all option # definitions have matching declarations. + # !!! __internal.check's value can't depend on any other config values + # without an infinite recursion. One way around this is to make the + # 'config' passed around to the modules be unconditionally unchecked, + # and only do the check in 'result'. config = yieldConfig prefix options; yieldConfig = prefix: set: let res = removeAttrs (mapAttrs (n: v: