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

Update binder gen parser to issue diagnostics for invalid input types #86856

Merged
merged 2 commits into from
Jun 1, 2023

Conversation

layomia
Copy link
Contributor

@layomia layomia commented May 29, 2023

No description provided.

@layomia layomia added this to the 8.0.0 milestone May 29, 2023
@layomia layomia requested review from eiriktsarpalis and tarekgh May 29, 2023 05:49
@layomia layomia self-assigned this May 29, 2023
@layomia layomia requested a review from jeffhandley as a code owner May 29, 2023 05:49
@ghost
Copy link

ghost commented May 29, 2023

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

Issue Details

null

Author: layomia
Assignees: layomia
Labels:

area-Extensions-Configuration

Milestone: 8.0.0

AddRootConfigType(methodGroup: BinderMethodSpecifier.Bind, overload, namedType, binderOperation.Location);
if (type.IsValueType)
{
_context.ReportDiagnostic(Diagnostic.Create(Diagnostics.ValueTypesInvalidForBind, binderOperation.Location, type));
Copy link
Member

@eiriktsarpalis eiriktsarpalis May 30, 2023

Choose a reason for hiding this comment

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

Nit: adding a dependency on SourceProductionContext in the parser means that its outputs can never be cached as incremental values. You should consider storing the Diagnostic instances in an a temporary list to be incorporated in the model that gets passed down to the emitter.

@layomia layomia force-pushed the binder-gen-structs branch from 80b2500 to 58ff1d5 Compare May 30, 2023 19:41
@layomia layomia merged commit ac5febd into dotnet:main Jun 1, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jul 1, 2023
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