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

Fix JSON src-gen errors when context types are not in namespaces #57183

Merged
merged 1 commit into from
Aug 11, 2021

Conversation

layomia
Copy link
Contributor

@layomia layomia commented Aug 11, 2021

@layomia layomia added this to the 6.0.0 milestone Aug 11, 2021
@layomia layomia self-assigned this Aug 11, 2021
@ghost
Copy link

ghost commented Aug 11, 2021

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

Issue Details

Fixes #56920. FYI @Vake93 @stephentoub

Author: layomia
Assignees: layomia
Labels:

area-System.Text.Json

Milestone: 6.0.0

{
internal static partial class JsonConstants
{
public const string GlobalNamespaceValue = "<global namespace>";
Copy link
Member

Choose a reason for hiding this comment

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

Is this defined by Roslyn? (do they have a constant somewhere?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's used in a few places in their repo, e.g. here, but not exposed publicly AFAIK .

Copy link
Member

@steveharter steveharter left a comment

Choose a reason for hiding this comment

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

LGTM; test appears to validate the original issue

@layomia layomia merged commit 022172a into dotnet:main Aug 11, 2021
@layomia layomia deleted the ContextTypeNoNamespace branch August 11, 2021 23:39
@ghost ghost locked as resolved and limited conversation to collaborators Sep 11, 2021
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.

JSON source generator fails to compile if context type isn't in a namespace
2 participants