From 4363d100efe2bee0dd2f236c4c1cd58e453f96eb Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Thu, 6 Nov 2025 00:39:53 +0000 Subject: [PATCH] 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. --- ci/rust-analyzer/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ci/rust-analyzer/default.nix b/ci/rust-analyzer/default.nix index d2d5492d..aa0c048b 100644 --- a/ci/rust-analyzer/default.nix +++ b/ci/rust-analyzer/default.nix @@ -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