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

UninitializedDbSetDiagnosticSuppressor doesn't work when a constructor is present #26879

Closed
roji opened this issue Dec 2, 2021 · 1 comment · Fixed by #27869
Closed

UninitializedDbSetDiagnosticSuppressor doesn't work when a constructor is present #26879

roji opened this issue Dec 2, 2021 · 1 comment · Fixed by #27869
Assignees
Labels
area-analyzer area-dbcontext closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@roji
Copy link
Member

roji commented Dec 2, 2021

#21608 introduced a DiagnosticsSuppressor to suppress CS8618 (non-nullable property is uninitialized) for DbSet properties on DbContexts. This currently works fine as long as there is no constructor on the DbContext, but fails if a constructor is defined, since the diagnostic is reported on the constructor declaration, and not on the property.

Roslyn issue: dotnet/roslyn#58073

@roji
Copy link
Member Author

roji commented Jan 29, 2022

Roslyn-side issue has been fixed - this should be unblocked in preview3.

@roji roji added area-dbcontext closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. and removed blocked labels Apr 22, 2022
roji added a commit to roji/efcore that referenced this issue Apr 22, 2022
roji added a commit to roji/efcore that referenced this issue Apr 22, 2022
@ajcvickers ajcvickers modified the milestones: 7.0.0, 7.0.0-preview5 May 4, 2022
@ajcvickers ajcvickers modified the milestones: 7.0.0-preview5, 7.0.0 Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer area-dbcontext closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants