ci/rust-analyzer: filter deprecated sub-types

This commit is contained in:
Matt Sturgeon
2025-11-07 00:02:09 +00:00
committed by Gaétan Lepage
parent 4363d100ef
commit 0a875e2d8a
+4 -2
View File
@@ -58,7 +58,9 @@ let
}
else if anyOf != null then
let
possibleTypes = lib.filter (sub: !(sub.type == "null" && nullable)) anyOf;
possibleTypes = lib.filter (
sub: !(sub.type or null == "null" && nullable) && !(sub.deprecated or false)
) anyOf;
in
{
kind = "oneOf";
@@ -198,7 +200,7 @@ let
enumDesc enum enumDescriptions
else
let
subEnums = lib.filter (lib.hasAttr "enum") anyOf;
subEnums = lib.filter (sub: sub ? enum && !(sub.deprecated or false)) anyOf;
subEnum =
assert lib.assertMsg (lib.length subEnums == 1)
"anyOf types may currently only contain a single enum. Found ${