From c6689c053b4f43ffe9d0a9a41eeabbc4a5c91342 Mon Sep 17 00:00:00 2001 From: Albie Spriddell Date: Sun, 17 Dec 2023 11:27:28 +0000 Subject: [PATCH] add null filter --- DragonFruit.Data.Roslyn/ApiRequestSourceGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DragonFruit.Data.Roslyn/ApiRequestSourceGenerator.cs b/DragonFruit.Data.Roslyn/ApiRequestSourceGenerator.cs index 9994b3b..8d0ae0a 100644 --- a/DragonFruit.Data.Roslyn/ApiRequestSourceGenerator.cs +++ b/DragonFruit.Data.Roslyn/ApiRequestSourceGenerator.cs @@ -63,7 +63,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) predicate: (syntaxNode, _) => syntaxNode is ClassDeclarationSyntax classDecl && classDecl.Modifiers.Any(x => x.IsKind(SyntaxKind.PartialKeyword)), transform: (generatorSyntaxContext, _) => GetSemanticTarget(generatorSyntaxContext)); - IncrementalValueProvider<(Compilation, ImmutableArray)> targets = context.CompilationProvider.Combine(apiRequestDerivedClasses.Collect()); + var targets = context.CompilationProvider.Combine(apiRequestDerivedClasses.Where(x => x != null).Collect()); context.RegisterSourceOutput(targets, (spc, source) => Execute(source.Item1, source.Item2, spc)); }