Skip to content

[tests] On 9.0.4 theres no build warning for System.Text.Json #29243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -126,25 +126,7 @@ public static void AssertWarnings(this List<WarningsPerFile> actualWarnings, Lis
#region Expected warning messages

// IMPORTANT: Always store expected File information as a relative path to the repo ROOT
private static readonly List<WarningsPerFile> expectedNativeAOTWarnings = new()
{
// NOTE: this one is only expected when rooting all assemblies
new WarningsPerFile
{
File = "/_/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/EnumConverterFactory.cs",
WarningsPerCode = new List<WarningsPerCode>
{
new WarningsPerCode
{
Code = "IL3050",
Messages = new List<string>
{
"System.Text.Json.Serialization.Converters.EnumConverterFactory.CreateConverter(Type,JsonSerializerOptions): Using member 'System.Text.Json.Serialization.Converters.EnumConverterFactory.Create(Type,EnumConverterOptions,JsonNamingPolicy,JsonSerializerOptions)' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling. JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.",
}
},
}
},
};
private static readonly List<WarningsPerFile> expectedNativeAOTWarnings = new();

#region Utility methods for generating the list of expected warnings

Expand Down
Loading