From 5ad01f1b6f1c3a9b0ebe0d81b51761cc80291f82 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 18 Aug 2023 11:36:51 +0200 Subject: lib/modules: Report a better error when option tree has bare type Improves on 0d472a62012364d064f0b75f1da491242c6ae9c6 - https://github.com/NixOS/nixpkgs/pull/242339 We actually do have the file name. Thanks Shawn8901 for the [feedback]! feedback: https://github.com/NixOS/nixpkgs/pull/242339#issuecomment-1683107055 --- lib/tests/modules.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/tests') diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index 5f2e3f2a3114..2c5e4cdbcec1 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -394,9 +394,9 @@ checkConfigError \ ./declare-set.nix ./declare-enable-nested.nix # Options: accidental use of an option-type instead of option (or other tagged type; unlikely) -checkConfigError 'Expected an option declaration at option path .result. but got an attribute set with type option-type' config.result ./options-type-error-typical.nix -checkConfigError 'Expected an option declaration at option path .result.here. but got an attribute set with type option-type' config.result.here ./options-type-error-typical-nested.nix -checkConfigError 'Expected an option declaration at option path .result. but got an attribute set with type configuration' config.result ./options-type-error-configuration.nix +checkConfigError 'In module .*/options-type-error-typical.nix: expected an option declaration at option path .result. but got an attribute set with type option-type' config.result ./options-type-error-typical.nix +checkConfigError 'In module .*/options-type-error-typical-nested.nix: expected an option declaration at option path .result.here. but got an attribute set with type option-type' config.result.here ./options-type-error-typical-nested.nix +checkConfigError 'In module .*/options-type-error-configuration.nix: expected an option declaration at option path .result. but got an attribute set with type configuration' config.result ./options-type-error-configuration.nix # Check that that merging of option collisions doesn't depend on type being set checkConfigError 'The option .group..*would be a parent of the following options, but its type .. does not support nested options.\n\s*- option.s. with prefix .group.enable..*' config.group.enable ./merge-typeless-option.nix -- cgit 1.4.1