mirror of
https://github.com/nix-community/nixvim.git
synced 2025-11-08 19:46:06 +01:00
ci/rust-analyzer: print offending sub-enums
When we throw "anyOf can only contain a single enum", let's also print the actual enums for debugging purposes.
This commit is contained in:
parent
a554f2b0f0
commit
4363d100ef
1 changed files with 4 additions and 3 deletions
|
|
@ -200,9 +200,10 @@ let
|
||||||
let
|
let
|
||||||
subEnums = lib.filter (lib.hasAttr "enum") anyOf;
|
subEnums = lib.filter (lib.hasAttr "enum") anyOf;
|
||||||
subEnum =
|
subEnum =
|
||||||
assert lib.assertMsg (
|
assert lib.assertMsg (lib.length subEnums == 1)
|
||||||
lib.length subEnums == 1
|
"anyOf types may currently only contain a single enum. Found ${
|
||||||
) "anyOf types may currently only contain a single enum";
|
lib.generators.toPretty { } subEnums
|
||||||
|
}";
|
||||||
lib.head subEnums;
|
lib.head subEnums;
|
||||||
in
|
in
|
||||||
if subEnum ? enumDescriptions then
|
if subEnum ? enumDescriptions then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue