-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Ensure reflection property metadata is instantiated lazily #76828
Ensure reflection property metadata is instantiated lazily #76828
Conversation
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis Issue DetailsUpdates the reflection-based JsonTypeInfo implementation so that the property metadata resolution logic is done lazily via the pre-existing Fixes #76807.
|
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.
LGTM.
...es/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionJsonTypeInfoOfT.cs
Show resolved
Hide resolved
...es/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionJsonTypeInfoOfT.cs
Show resolved
Hide resolved
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3226217916 |
@eiriktsarpalis backporting to release/7.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Ensure reflection property metadata is instantiated lazily.
Using index info to reconstruct a base tree...
M src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionJsonTypeInfoOfT.cs
Falling back to patching base and 3-way merge...
Auto-merging src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionJsonTypeInfoOfT.cs
CONFLICT (content): Merge conflict in src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionJsonTypeInfoOfT.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Ensure reflection property metadata is instantiated lazily.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
Updates the reflection-based JsonTypeInfo implementation so that the property metadata resolution logic is done lazily via the pre-existing
LateAddProperties
method used by the source-gen metadata implementation instead of the constructor. This ensures that any pre-existing errors related to property misconfiguration/unsupported properties occurs at configuration time rather than at construction time.Fixes #76807.