mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
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
|
# default module is merged into nodes.foo
|
||||||
checkConfigOutput '"beta"' config.nodes.foo.settingsDict.c ./deferred-module.nix
|
checkConfigOutput '"beta"' config.nodes.foo.settingsDict.c ./deferred-module.nix
|
||||||
# errors from the default module are reported with accurate location
|
# 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
|
# Check the file location information is propagated into submodules
|
||||||
checkConfigOutput the-file.nix config.submodule.internalFiles.0 ./submoduleFiles.nix
|
checkConfigOutput the-file.nix config.submodule.internalFiles.0 ./submoduleFiles.nix
|
||||||
|
|
|
@ -544,7 +544,7 @@ rec {
|
||||||
name = "deferredModule";
|
name = "deferredModule";
|
||||||
description = "module";
|
description = "module";
|
||||||
check = t: isAttrs t || isFunction t;
|
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!
|
# The type of a type!
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue