diff --git a/GFramework.Game.Tests/Config/ArchitectureConfigIntegrationTests.cs b/GFramework.Game.Tests/Config/ArchitectureConfigIntegrationTests.cs index d4a448c5..95b5c5e8 100644 --- a/GFramework.Game.Tests/Config/ArchitectureConfigIntegrationTests.cs +++ b/GFramework.Game.Tests/Config/ArchitectureConfigIntegrationTests.cs @@ -86,6 +86,10 @@ public class ArchitectureConfigIntegrationTests { // Ignored: cleanup is best effort and should not fail the test. } + catch (UnauthorizedAccessException) + { + // Ignored: cleanup is best effort and can transiently fail when files are still being released. + } } private const string MonsterSchemaJson = @"{ diff --git a/GFramework.SourceGenerators.Tests/Config/SchemaConfigGeneratorTests.cs b/GFramework.SourceGenerators.Tests/Config/SchemaConfigGeneratorTests.cs index 133884b2..20f74ea9 100644 --- a/GFramework.SourceGenerators.Tests/Config/SchemaConfigGeneratorTests.cs +++ b/GFramework.SourceGenerators.Tests/Config/SchemaConfigGeneratorTests.cs @@ -345,6 +345,10 @@ public class SchemaConfigGeneratorTests Assert.That(tableSource, Does.Not.Contain("FindByDropItems(")); Assert.That(tableSource, Does.Not.Contain("FindByTargetId(")); Assert.That(tableSource, Does.Not.Contain("FindByReward(")); + Assert.That(tableSource, Does.Not.Contain("TryFindFirstById(")); + Assert.That(tableSource, Does.Not.Contain("TryFindFirstByDropItems(")); + Assert.That(tableSource, Does.Not.Contain("TryFindFirstByTargetId(")); + Assert.That(tableSource, Does.Not.Contain("TryFindFirstByReward(")); }); } } diff --git a/GFramework.SourceGenerators/Config/SchemaConfigGenerator.cs b/GFramework.SourceGenerators/Config/SchemaConfigGenerator.cs index 60f3ec53..50ac393a 100644 --- a/GFramework.SourceGenerators/Config/SchemaConfigGenerator.cs +++ b/GFramework.SourceGenerators/Config/SchemaConfigGenerator.cs @@ -1043,7 +1043,7 @@ public sealed class SchemaConfigGenerator : IIncrementalGenerator builder.AppendLine(); builder.AppendLine( " // Scan the current table snapshot on demand so generated helpers stay aligned with reloadable runtime data."); - builder.AppendLine($" foreach (var candidate in All())"); + builder.AppendLine(" foreach (var candidate in All())"); builder.AppendLine(" {"); builder.AppendLine( $" if (global::System.Collections.Generic.EqualityComparer<{property.TypeSpec.ClrType}>.Default.Equals(candidate.{property.PropertyName}, value))");