-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
A little more regex source generator tweaking #62605
Conversation
I was overaggressive in moving these to the beginning. Some are fine where they're needed.
Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions Issue DetailsCouldn't help myself :) It's fun just looking at what code the generator writes for varying regexes and finding ways to improve it a bit here and there. cc: @joperezr
|
src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.Emitter.cs
Show resolved
Hide resolved
src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.Emitter.cs
Show resolved
Hide resolved
src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.Emitter.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.Emitter.cs
Outdated
Show resolved
Hide resolved
It's probably good to get quality high for the first release. After that, any further improvements could cause massive source control diffs when the generators are re-run. |
I'm not concerned about that. These source generators are intended to be run as part of every build, by default the source that's generated isn't even saved to disk, and even if you opt-in to saving it to disk, it's saved to a temporary location. Limiting innovation here because of concerns around improvements to the source generator would be akin to saying compilers shouldn't improve from version to version. |
Couldn't help myself :) It's fun just looking at what code the generator writes for varying regexes and finding ways to improve it a bit here and there.
cc: @joperezr