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

Add .NET 7 source gen regression tests #78857

Merged
merged 1 commit into from
Nov 30, 2022

Conversation

eiriktsarpalis
Copy link
Member

Following up on #71850 this PR adds regression tests locked to code generated via the .NET 7 sdk. Repo used for generating code can be found here: https://github.com/eiriktsarpalis/stj-regressionsuite

@ghost
Copy link

ghost commented Nov 25, 2022

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

Following up on #71850 this PR adds regression tests locked to code generated via the .NET 7 sdk. Repo used for generating code can be found here: https://github.com/eiriktsarpalis/stj-regressionsuite

Author: eiriktsarpalis
Assignees: eiriktsarpalis
Labels:

area-System.Text.Json

Milestone: -

Copy link
Contributor

@layomia layomia left a comment

Choose a reason for hiding this comment

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

LGTM.

TypeInfoResolver = JsonTypeInfoResolver.Combine(Net70GeneratedContext.Default, new DefaultJsonTypeInfoResolver())
};

// Unlike v6, v7 Contexts do implement IJsonTypeInfoResolver so combined resolvers will produce the expected output.
Copy link
Contributor

Choose a reason for hiding this comment

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

The other tests are identical. Should we have an abstraction?

Copy link
Member Author

Choose a reason for hiding this comment

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

They actually differ in a few places, so I don't think DRY would help a lot here.

@eiriktsarpalis eiriktsarpalis merged commit 62bb4f2 into dotnet:main Nov 30, 2022
@eiriktsarpalis eiriktsarpalis deleted the stj-regressionsuite branch November 30, 2022 11:57
@ghost ghost locked as resolved and limited conversation to collaborators Dec 30, 2022
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.

2 participants