1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-09 03:56:05 +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
parent b2cbb04dd9
commit 44ed7456c7
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

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