+28
-5
lib/options.nix
+28
-5
lib/options.nix
···else throw "Cannot merge definitions of `${showOption loc}'. Definition values:${showDefs defs}";-throw "The option `${showOption loc}' is defined multiple times while it's expected to be unique.\n${message}\nDefinition values:${showDefs defs}\n${prioritySuggestion}";+NOTE: When the type is not checked completely by check, pass a merge function for further checking (of sub-attributes, etc).+throw "The option `${showOption loc}' is defined multiple times while it's expected to be unique.\n${message}\nDefinition values:${showDefs defs}\n${prioritySuggestion}";+# The inner conditional could be factored out, but this way we take advantage of partial application.
+10
lib/tests/modules.sh
+10
lib/tests/modules.sh
···checkConfigError 'The option .int.a. is used but not defined' config.int.a ./emptyValues.nixcheckConfigError 'The option .nonEmptyList.a. is used but not defined' config.nonEmptyList.a ./emptyValues.nix+checkConfigError 'The option .examples\.merged. is defined multiple times while it.s expected to be unique' config.examples.merged.a ./types-unique.nix+checkConfigError 'We require a single definition, because seeing the whole value at once helps us maintain critical invariants of our system.' config.examples.merged.a ./types-unique.nix+checkConfigError 'A definition for option .examples\.badLazyType\.a. is not of type .string.' config.examples.badLazyType.a ./types-unique.nix
+27
lib/tests/modules/types-unique.nix
+27
lib/tests/modules/types-unique.nix
···+{ message = "We require a single definition, because seeing the whole value at once helps us maintain critical invariants of our system."; }
+1
-1
lib/types.nix
+1
-1
lib/types.nix
···