Uh oh!
There was an error while loading. Please reload this page.
Enable Native AOT testing in System.Text.Json. - #86975
Conversation
ghost
commented
May 31, 2023
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
eiriktsarpalis
commented
Jun 1, 2023
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…ress misc feedback.
eiriktsarpalis
commented
Jun 1, 2023
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| [Theory] | ||
| [MemberData(nameof(GetAsyncEnumerableSources))] | ||
| public async Task WriteNestedAsyncEnumerable_DTO<TElement>(IEnumerable<TElement> source, int delayInterval, int bufferSize) |
There was a problem hiding this comment.
This test was identical to the one above, so I deleted it.
| await Assert.ThrowsAsync<JsonException>(() => Serializer.DeserializeWrapper<Point_2D_Struct>("{true")); | ||
| } | ||
| #if !BUILDING_SOURCE_GENERATOR_TESTS // Anonymous types not supported in source gen |
There was a problem hiding this comment.
The test is hardcoding reflection, so I'm just disabling it for source gen.
| private static void ExtensionProperty_SupportsWritingToCustomSerializerWithOptionsInternal<TDictionary, TConverter>() | ||
| where TDictionary : new() | ||
| where TConverter : JsonConverter, new() | ||
| [MemberData(nameof(GetCustomOverflowConverters))] |
There was a problem hiding this comment.
Refactored the tests somewhat to reduce the number of generic parameters needed to drive the tests.
MichalStrehovsky
left a comment
There was a problem hiding this comment.
Looks good to me from NativeAOT perspective, but can't speak about the test changes in general. Thank you!
Uh oh!
There was an error while loading. Please reload this page.
| <Directives> | ||
| <Application> | ||
| <!-- NB Shared specializations must also be replicated in the roslyn3.11.rd.xml file --> | ||
| <Assembly Name="System.Text.Json.SourceGeneration.Roslyn4.4.Tests"> |
There was a problem hiding this comment.
why are those needed? Do we know the reason they're trimmed out?
There was a problem hiding this comment.
They are helping the AOT compiler generate generic method specializations we know will be needed at runtime (but can't be inferred at compile time).
There was a problem hiding this comment.
It's the usual issue of trying to do Type.MakeGenericType/Method.MakeGenericMethod in AOT. We're working on a fix specifically for theories though: #86975 (comment)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Fixes#73431. Fixes#86973.