Skip to content
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

[release/6.0] Treat 'abstract' properties the same as 'virtual' for src-gen #59771

Merged
merged 2 commits into from
Sep 30, 2021

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 29, 2021

Backport of #59707 to release/6.0

/cc @steveharter

Customer Impact

Fixes an issue where an abstract property with a [JsonIgnore] attribute can cause the source generator to fail and not generate the code. If the base class is not owned by the customer, there is no work-around without this PR.

Testing

A new test was added that covers the failure case as well as other permuations.

Risk

Low; the change is specific to source-gen (does not affect the normal JSON serializer) and is a one-line change specific to initializing the metadata for a method.

@ghost
Copy link

ghost commented Sep 29, 2021

Tagging subscribers to this area: @dotnet/area-system-text-json
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #59707 to release/6.0

/cc @steveharter

Customer Impact

Testing

Risk

Author: github-actions[bot]
Assignees: -
Labels:

area-System.Text.Json

Milestone: -

@steveharter steveharter self-assigned this Sep 29, 2021
@steveharter steveharter added this to the 6.0.0 milestone Sep 29, 2021
@steveharter steveharter added the Servicing-consider Issue for next servicing release review label Sep 29, 2021
@danmoseley
Copy link
Member

Very low risk change scoped to SG and fixing an issue reported by customer. Please send mail if you haven't already.

@@ -37,7 +37,7 @@ public static MethodAttributes GetMethodAttributes(this IMethodSymbol methodSymb

if (methodSymbol.IsAbstract)
{
attributes |= MethodAttributes.Abstract;
attributes |= MethodAttributes.Abstract | MethodAttributes.Virtual;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@steveharter steveharter added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 29, 2021
@steveharter
Copy link
Member

Servicing approved via mail.

@danmoseley danmoseley merged commit 8e2b607 into release/6.0 Sep 30, 2021
@danmoseley danmoseley deleted the backport/pr-59707-to-release/6.0 branch September 30, 2021 00:50
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Text.Json Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants