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

Avoid file private visibility when targeting LangVersion < 11 #46496

Open
captainsafia opened this issue Feb 7, 2023 · 3 comments
Open

Avoid file private visibility when targeting LangVersion < 11 #46496

captainsafia opened this issue Feb 7, 2023 · 3 comments
Labels
area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc feature-rdg

Comments

@captainsafia
Copy link
Member

The RequestDelegateGenerator currently emits a class with file private visibility to avoid leaking implementation details to user space. This can be problematic if users are targeting a language version below C# 11. To avoid this, we'll want to use internal visibility for those scenarios.

@captainsafia captainsafia added the area-web-frameworks *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels label Feb 7, 2023
@captainsafia captainsafia added this to the .NET 8 Planning milestone Feb 7, 2023
@captainsafia captainsafia moved this to Committed in [.NET 8] Web Frameworks Feb 7, 2023
@ghost
Copy link

ghost commented Feb 7, 2023

Thanks for contacting us.

We're moving this issue to the .NET 8 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@eerhardt
Copy link
Member

We should just error out if you aren't using a new enough C#. It is what we do in other source generators - i.e. Regex and Config Binder. ex. dotnet/runtime#83996

@mitchdenny
Copy link
Member

Does raise an interesting question. With source generators the language version we rely on when we release 8.0 becomes part of the contract. Moving to newer language features could be considered a breaking change.

@amcasey amcasey added the area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc label Jun 2, 2023
@captainsafia captainsafia removed the area-web-frameworks *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels label Jun 6, 2023
@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 6, 2024
@wtgodbe wtgodbe removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 6, 2024
@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 6, 2024
@wtgodbe wtgodbe removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 13, 2024
@dotnet dotnet deleted a comment from dotnet-policy-service bot Feb 13, 2024
@dotnet dotnet deleted a comment from dotnet-policy-service bot Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc feature-rdg
Projects
No open projects
Status: Committed
Development

No branches or pull requests

5 participants