1
0
Fork 0
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:
Matt Sturgeon 2025-11-06 00:39:53 +00:00 committed by Gaétan Lepage
parent a554f2b0f0
commit 4363d100ef

View file

@ -200,9 +200,10 @@ let
let
subEnums = lib.filter (lib.hasAttr "enum") anyOf;
subEnum =
assert lib.assertMsg (
lib.length subEnums == 1
) "anyOf types may currently only contain a single enum";
assert lib.assertMsg (lib.length subEnums == 1)
"anyOf types may currently only contain a single enum. Found ${
lib.generators.toPretty { } subEnums
}";
lib.head subEnums;
in
if subEnum ? enumDescriptions then