lib.types.deferredModule: Improve reported location
This commit is contained in:
parent
38b7709a6f
commit
a2c29561e7
2 changed files with 2 additions and 2 deletions
|
@ -198,7 +198,7 @@ checkConfigOutput '^true$' config.submodule.enable ./declare-submoduleWith-path.
|
|||
# default module is merged into nodes.foo
|
||||
checkConfigOutput '"beta"' config.nodes.foo.settingsDict.c ./deferred-module.nix
|
||||
# errors from the default module are reported with accurate location
|
||||
checkConfigError 'In `default from the-file-that-contains-the-bad-config.nix'\'': "bogus"' config.nodes.foo.bottom ./deferred-module.nix
|
||||
checkConfigError 'In `the-file-that-contains-the-bad-config.nix, via option default'\'': "bogus"' config.nodes.foo.bottom ./deferred-module.nix
|
||||
|
||||
# Check the file location information is propagated into submodules
|
||||
checkConfigOutput the-file.nix config.submodule.internalFiles.0 ./submoduleFiles.nix
|
||||
|
|
|
@ -544,7 +544,7 @@ rec {
|
|||
name = "deferredModule";
|
||||
description = "module";
|
||||
check = t: isAttrs t || isFunction t;
|
||||
merge = loc: defs: map (def: lib.setDefaultModuleLocation "${showOption loc} from ${def.file}" def.value) defs;
|
||||
merge = loc: defs: map (def: lib.setDefaultModuleLocation "${def.file}, via option ${showOption loc}" def.value) defs;
|
||||
};
|
||||
|
||||
# The type of a type!
|
||||
|
|
Loading…
Reference in a new issue