From a26641c07c62a0386553c31011ee70cb4ac90d68 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Thu, 6 Nov 2025 00:40:56 +0000 Subject: [PATCH] ci/rust-analyzer: filter deprecated sub-types --- ci/rust-analyzer/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ci/rust-analyzer/default.nix b/ci/rust-analyzer/default.nix index aa0c048b..255f9147 100644 --- a/ci/rust-analyzer/default.nix +++ b/ci/rust-analyzer/default.nix @@ -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 ${