Skip to content

Conversation

@eiriktsarpalis
Copy link
Member

Makes the following changes:

  1. Ensures that types of ignored/private properties are not included by the source generator.
  2. Refactors the property conflict resolution algorithm so that it is line-by-line equivalent to the reflection variant for consistency and making future changes easier to maintain.
  3. Refactors the SG object parsing logic into distinct methods for constructor, property and property initializer resolution.
  4. Avoids the use of ISymbol.ToDisplayString() in a few places when doing property and interface resolution.

Fix #76919.

@eiriktsarpalis eiriktsarpalis requested a review from krwq June 11, 2023 18:24
@ghost ghost assigned eiriktsarpalis Jun 11, 2023
@ghost
Copy link

ghost commented Jun 11, 2023

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

Issue Details

Makes the following changes:

  1. Ensures that types of ignored/private properties are not included by the source generator.
  2. Refactors the property conflict resolution algorithm so that it is line-by-line equivalent to the reflection variant for consistency and making future changes easier to maintain.
  3. Refactors the SG object parsing logic into distinct methods for constructor, property and property initializer resolution.
  4. Avoids the use of ISymbol.ToDisplayString() in a few places when doing property and interface resolution.

Fix #76919.

Author: eiriktsarpalis
Assignees: -
Labels:

area-System.Text.Json

Milestone: -

Copy link
Member

@krwq krwq left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent source-gen from generating code for private fields and those marked with JsonIgnore

2 participants