mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
lib/modules: add nested 'headError.message'
This should make headError extensible other information needs to be passed This seems to improve performance slightly
This commit is contained in:
parent
1765370051
commit
50bef19448
2 changed files with 6 additions and 4 deletions
|
|
@ -104,7 +104,7 @@ let
|
|||
let
|
||||
invalidDefs = filter (def: !check def.value) defs;
|
||||
in
|
||||
if invalidDefs != [ ] then "Definition values: ${showDefs invalidDefs}" else null;
|
||||
if invalidDefs != [ ] then { message = "Definition values: ${showDefs invalidDefs}"; } else null;
|
||||
|
||||
outer_types = rec {
|
||||
isType = type: x: (x._type or "") == type;
|
||||
|
|
@ -1450,8 +1450,10 @@ let
|
|||
valueMeta = {
|
||||
inherit headError;
|
||||
};
|
||||
headError = "The option `${showOption loc}` is neither a value of type `${t1.description}` nor `${t2.description}`, Definition values: ${showDefs defs}";
|
||||
value = null;
|
||||
headError = {
|
||||
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.";
|
||||
};
|
||||
in
|
||||
checkedAndMerged;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue