-
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
Fix generic recursion condition when calling DeserializeAsyncEnumerable in NativeAOT. #85176
Fix generic recursion condition when calling DeserializeAsyncEnumerable in NativeAOT. #85176
Conversation
…erable in NativeAOT.
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis Issue DetailsThis PR makes the following changes:
|
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Stream.cs
Show resolved
Hide resolved
Thank you!! Will validate with the Store too and report back 🙂 |
Tagging subscribers to 'size-reduction': @eerhardt, @SamMonoRT, @marek-safar Issue DetailsThis PR makes the following changes:
I've validated that the AOT warning no longer occurs using manual testing. Fix #84922. cc @Sergio0694
|
...s/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonTypeInfoOfT.ReadHelper.cs
Outdated
Show resolved
Hide resolved
LGTM once @Sergio0694 confirms that it fixes the problem for store. Thank you! |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just commented in the other thread, LGTM!!
@eiriktsarpalis thank you!! 🙌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the pending feedback, LGTM
This PR makes the following changes:
JsonTypeInfo<Queue<T>>
factory fromJsonTypeInfo<T>
toJsonSerializer
to avoid triggering polymorphic recursion.DeserializeAsyncEnumerable
APIs added in Preview 1 via Add weakly typed Serialize and Deserialize overloads accepting JsonTypeInfo. #79397. Supporting that feature necessitates everyJsonTypeInfo<T>
encapsulating the factory forJsonTypeInfo<Queue<T>>
triggering the recursion condition.I've validated that the AOT warning no longer occurs using manual testing.
Fix #84922.
cc @Sergio0694