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

Enable regex generator nullable reference types validation #80142

Merged
merged 4 commits into from
Jan 4, 2023

Conversation

stephentoub
Copy link
Member

Multiple times in the past we've audited the regex source generator for nullable reference type annotations, but as it was only compiled officially for netstandard2.0, any work we did to get it green eventually rotted. This follows the work done to enable also building a .NET Core target for the json generator to do the same for the regex generator. In doing so, I also took the opportunity to clean up the REGEXGENERATOR compilation constant.

Multiple times in the past we've audited the regex source generator for nullable reference type annotations, but as it was only compiled officially for netstandard2.0, any work we did to get it green eventually rotted.  This follows the work done to enable also building a .NET Core target for the json generator to do the same for the regex generator.  In doing so, I also took the opportunity to clean up the REGEXGENERATOR compilation constant.
@ghost
Copy link

ghost commented Jan 3, 2023

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

Issue Details

Multiple times in the past we've audited the regex source generator for nullable reference type annotations, but as it was only compiled officially for netstandard2.0, any work we did to get it green eventually rotted. This follows the work done to enable also building a .NET Core target for the json generator to do the same for the regex generator. In doing so, I also took the opportunity to clean up the REGEXGENERATOR compilation constant.

Author: stephentoub
Assignees: -
Labels:

area-System.Text.RegularExpressions

Milestone: 8.0.0

@ghost ghost assigned stephentoub Jan 3, 2023
@stephentoub
Copy link
Member Author

@ViktorHofer, this currently fails with:
"CSC : error CS8032: An instance of analyzer System.Text.RegularExpressions.Generator.RegexGenerator cannot be created from D:\repos\runtime\artifacts\bin\System.Text.RegularExpressions.Generator\Debug\net7.0\System.Text.RegularExpressions.Generator.dll : Could not load
file or assembly 'System.Runtime, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.. [D:\repos\runtime\src\libraries\System.Private.Xml\src\System.Private.Xml.csproj::TargetFramework=net8.0-windows]"
Any suggestion before I dig in deeper?

@build-analysis build-analysis bot mentioned this pull request Jan 4, 2023
Copy link
Member

@joperezr joperezr left a comment

Choose a reason for hiding this comment

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

Other than the small comments, changes LGTM.

@stephentoub stephentoub merged commit 11ab33a into dotnet:main Jan 4, 2023
@stephentoub stephentoub deleted the regexgennrt branch January 4, 2023 20:59
@ghost ghost locked as resolved and limited conversation to collaborators Feb 4, 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.

5 participants