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

Set minimum language version allowed by config binding generator #83996

Merged
merged 2 commits into from
Mar 29, 2023

Conversation

layomia
Copy link
Contributor

@layomia layomia commented Mar 27, 2023

Fixes #83535. Requires language version to be at least C# 11. This choice is rather arbitrary but follows the version required by the Regex generator (though it appears regex still generates partial code in some scenarios). The only feature we (currently) need to enforce a minimum version for is nullable, which would be C# 8.0.

The benefit of this change is that we'll emit a single diagnostic rather than generating nullable annotating code which would cause multiple compiler diagnostics. The logic will probably be slightly refactored as part of #83534, but wanted to fix now & discuss as it seems like a policy decision.

cc @eerhardt @ericstj

@ghost
Copy link

ghost commented Mar 27, 2023

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

Issue Details

Fixes #83535. Enforces language version to be at least C#. The only feature we need to enforce a minimum version is nullable, which would be C#. The benefit of this change is that we'll emit a single diagnostic rather than generating nullable annotating code which would cause multiple compiler diagnostics.

The logic will probably be slightly refactored as part of #83534, but wanted to fix now & discuss as it seems like a policy decision.

cc @eerhardt @ericstj

Author: layomia
Assignees: layomia
Labels:

area-Extensions-Configuration

Milestone: 8.0.0

@layomia layomia merged commit 9111203 into dotnet:main Mar 29, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Apr 28, 2023
@layomia layomia added the source-generator Indicates an issue with a source generator feature label May 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Extensions-Configuration source-generator Indicates an issue with a source generator feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Respect language version in config binding source generator
3 participants