+46
-3
lib/modules.nix
+46
-3
lib/modules.nix
······+throw "A definition for option `${showOption loc}' is not of type `${type.description}'. TypeError: ${checkedAndMerged.headError.message}"···"The option `${showOption loc}' was accessed but has no value defined. Try setting the option.";···
+379
lib/tests/checkAndMergeCompat.nix
+379
lib/tests/checkAndMergeCompat.nix
···+msg = ''A definition for option `foo' is not of type `string or signed integer convertible to it.*'';
+22
-2
lib/tests/modules.sh
+22
-2
lib/tests/modules.sh
···checkConfigOutput '^"24"$' config.value ./declare-coerced-value.nix ./define-value-string.nix-checkConfigError 'A definition for option .* is not.*string or signed integer convertible to it.*. Definition values:\n\s*- In .*: \[ \]' config.value ./declare-coerced-value.nix ./define-value-list.nix+checkConfigError 'A definition for option .*. is not of type .*.\n\s*- In .*: \[ \]' config.value ./declare-coerced-value.nix ./define-value-list.nixcheckConfigError 'The option .value. in .*/declare-coerced-value.nix. is already declared in .*/declare-coerced-value-no-default.nix.' config.value ./declare-coerced-value.nix ./declare-coerced-value-no-default.nix-checkConfigError 'A definition for option .* is not of type .*. Definition values:\n\s*- In .*: "1000"' config.value ./declare-coerced-value-unsound.nix ./define-value-string-bigint.nix+checkConfigError 'A definition for option .* is not of type .*.\n\s*- In .*: "1000"' config.value ./declare-coerced-value-unsound.nix ./define-value-string-bigint.nixcheckConfigError 'toInt: Could not convert .* to int' config.value ./declare-coerced-value-unsound.nix ./define-value-string-arbitrary.nix···checkConfigError 'attribute .*bar.* not found' config.sub.conditionalImportAsNixos.bar ./specialArgs-class.nixcheckConfigError 'attribute .*foo.* not found' config.sub.conditionalImportAsDarwin.foo ./specialArgs-class.nix+checkConfigOutput '42' options.attrsOfModule.valueMeta.attrs.foo.configuration.options.bar.value ./composed-types-valueMeta.nix+checkConfigOutput '42' options.mergedAttrsOfModule.valueMeta.attrs.foo.configuration.options.bar.value ./composed-types-valueMeta.nix+checkConfigError 'A definition for option .* is not of type .signed integer.*' config.v1CheckedFail ./add-check.nix+checkConfigError 'A definition for option .* is not of type .attribute set of signed integer.*' config.v2checkedFail ./add-check.nix
+36
lib/tests/modules/add-check.nix
+36
lib/tests/modules/add-check.nix
···
+75
lib/tests/modules/composed-types-valueMeta.nix
+75
lib/tests/modules/composed-types-valueMeta.nix
···+default = (builtins.head options.mergedListOfModule.valueMeta.list).configuration.options.bar.value;
+60
lib/tests/modules/types-valueMeta.nix
+60
lib/tests/modules/types-valueMeta.nix
···
+25
lib/tests/nix-unit.nix
+25
lib/tests/nix-unit.nix
···
+3
lib/tests/release.nix
+3
lib/tests/release.nix
+201
-76
lib/types.nix
+201
-76
lib/types.nix
·········+if invalidDefs != [ ] then { message = "Definition values: ${showDefs invalidDefs}"; } else null;······+ " of ${optionDescriptionPhrase (class: class == "noun" || class == "composite") elemType}";+zipAttrsWith (name: defs: mergeDefinitions (loc ++ [ name ]) elemType defs) (pushPositions defs)+zipAttrsWith (name: defs: mergeDefinitions (loc ++ [ name ]) elemType defs) (pushPositions defs)·········+message = "The option `${showOption loc}` is neither a value of type `${t1.description}` nor `${t2.description}`, Definition values: ${showDefs defs}";+value = abort "(t.merge.v2 defs).value must only be accessed when `.headError == null`. This is a bug in code that consumes a module system type.";·········+headError' = if orig.headError != null then orig.headError else checkDefsForError check loc defs;