-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Get System.Text.Json.SourceGeneration tests running with NativeAot #73431
Comments
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis Issue DetailsIt would be good to go over these failures to see if #73124 is really the only AOT issue. Full run log is here: The main buckets:
I haven't really gone through everything. Going to block this all on this bug. There's little point testing S.T.Json with NativeAOT if it doesn't work.
|
A common theme in these stacktraces is the presence of runtime/src/libraries/System.Text.Json/tests/Common/TestClasses/TestClasses.cs Lines 457 to 475 in dafc6df
TL;DR sourcegen uses reflection serialization as the baseline for validating serialization results (FWIW the same holds for the stacktraces you're highlighting). We should try to remove that dependency but it is going to be a fairly involved exercise. This is made harder by the fact that a lot of these types are shared between sourcegen and reflection test suites. Ideally we should get to a point where it is possible to enable RequiresDynamicCode warnings in the sourcegen test projects. |
For the |
Triage / action items:
|
If we had the S.T.Json tests running with NativeAOT in the CI, we'd probably be able to see the issue described in #84922 (comment) before it's reported by customers. The warning would fail the test build due to WarningsAsErrors. |
* Enable Native AOT testing in System.Text.Json. Fix #73431. * Enabled AOT testing for generic theories/MakeGenericMethod tests. Address misc feedback. * Remove hardcoded JsonSerializer calls from test suite.
It would be good to go over these failures to see if #73124 is really the only AOT issue.
Full run log is here:
jsonfail.txt
The main buckets:
JsonConverterFactory
-based converters. #73124I haven't really gone through everything.
Going to block this all on this bug. There's little point testing S.T.Json with NativeAOT if it doesn't work.
The text was updated successfully, but these errors were encountered: