Skip to content

[release/6.0] Support duplicated type names with src gen - #58766

Merged
danmoseley merged 2 commits into
release/6.0from
backport/pr-58448-to-release/6.0
Sep 8, 2021
Merged

[release/6.0] Support duplicated type names with src gen#58766
danmoseley merged 2 commits into
release/6.0from
backport/pr-58448-to-release/6.0

Conversation

@github-actions

@github-actionsgithub-actionsBot commented Sep 7, 2021

Copy link
Copy Markdown
Contributor

Backport of #58448 to release/6.0

Addresses #57349 for the System.Text.Json generator

Customer Impact

Support an edge case where a given type (by full name) can exist in more than one location. Without this change, any duplicated Types are not generated (the non-wrapped API returns null when there are conflicts). This allows the public version of a Type to be returned over the internal version of the Type, for example.

The corresponding issue and code was provided by the Roslyn team. The code wraps the API that resolves a Type name to a Type in order to allow public to win over internal, for example.

Testing

A test was added that duplicates types by name. The test failed before the changes were made.

Risk

Low - the corresponding code was provided by Roslyn and was previously tested. In the future, new API(s) will likely be exposed by Roslyn to address this scenario more fully and then this code can be removed.

@ghost

ghost commented Sep 7, 2021

Copy link
Copy Markdown

Tagging subscribers to this area: @eiriktsarpalis, @layomia
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #58448 to release/6.0

/cc @steveharter

Customer Impact

Testing

Risk

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

area-System.Text.Json

Milestone:-

@stevehartersteveharter self-assigned this Sep 8, 2021
@stevehartersteveharter added this to the 6.0.0 milestone Sep 8, 2021
@Anipik

Copy link
Copy Markdown
Contributor

cc @danmoseley

@danmoseley

Copy link
Copy Markdown
Contributor

Approved. Value: Change increases likelihood customers will not fail with this new tech.. Risk: Changes only affect source gen. Roslyn changes reviewed by Sam. Automated tests added.

@danmoseleydanmoseley added the Servicing-approved Approved for servicing release label Sep 8, 2021
@danmoseley
danmoseley merged commit 4cf387b into release/6.0Sep 8, 2021
@danmoseley
danmoseley deleted the backport/pr-58448-to-release/6.0 branch September 8, 2021 21:18
@ghostghost locked as resolved and limited conversation to collaborators Oct 9, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Text.JsonServicing-approvedApproved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Anipik@danmoseley@steveharter