lib.modules: Adjust error message

- Lower case error trace for consistency
- Be more explicit about the condition under which the hint applies,
  and the resolution.
This commit is contained in:
Robert Hensing
2025-08-02 11:01:14 +02:00
parent 3d15b12d8f
commit c34e08489e

View File

@@ -258,8 +258,7 @@ let
;
_class = class;
_prefix = prefix;
config = builtins.addErrorContext "If you get an infinite recursion here, you probably reference `config`
in `imports`. This is not supported; consider using mkEnableOption." config;
config = addErrorContext "if you get an infinite recursion here, you probably reference `config` in `imports`. This is not possible. If you are trying to achieve a conditional behavior dependent on `config`, consider importing unconditionally, and using `mkEnableOption` and `mkIf` to control its effect." config;
}
// specialArgs
);