-
Notifications
You must be signed in to change notification settings - Fork 656
Convert to GeneratedRegexes #4595
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
Conversation
src/GitVersion.Configuration.Tests/Configuration/ConfigurationProviderTests.cs
Show resolved
Hide resolved
@9swampy thanks for creating this PR, it's a nice follow up to the effort to have a consistent common RegexPatterns class. I never had the time to continue the effort. Thanks for adding tests to validate the regex patterns prior to other changes. Please have a look at the comments I added. |
src/GitVersion.Configuration.Tests/Configuration/ConfigurationProviderTests.cs
Show resolved
Hide resolved
DictionaryExtensions.GetAdd<string, Regex> no longer referenced but it's in the shipped API, I'd suggest it's better to hide the Cache dictionary altogether? |
yes, remove the extension, and in the same class there is one more GetAdd, you probably can mark it as internal, then you can remove the entries from the publicAPI (the builld should fail if not removed I guess) |
you will need to rebase onto |
In a scope but not for this PR. I know in the dotnet 9 they expanded |
@9swampy can you please rebase onto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
…xAttribute.Regex)] appropriately.
Thank you @9swampy for your contribution! |
Nice to give a little back; I've been using GitVersion since Jake gave a demo at a London meetup very early doors so long overdue. Kudos for keeping it moving along. Code wise it's a no brainer but I'd be curious if you extract any performance stats the see if the change made much difference? |
Honestly I did not notice much performance on the repos I tested mainly because they are not that big. But this should server in the potential effort going towards native AOT |
Thanks for wanting to put some effort on this project. |
Description
Convert to GeneratedRegexes
Related Issue
Motivation and Context
#4588 (comment)
As long as all tests pass, I'm all for converting to the new, precompiled variant!
#4588 (comment)
we will migrate this to newer GeneratedRegex in one go later on
How Has This Been Tested?
Primarily deferring to existing test coverage but I retrospectively went back and added https://github.com/GitTools/GitVersion/pull/4595/files#diff-05aaddf75a2990dace1f1b29f0c7bdccfab7d710e2e4b0c94a168020a5b9e5e4
as AI had suggested some dubious conversions.
Splitting up the commits helped build confidence in the conversions; good shout @arturcic
Without NCrunch isn't so easy for me to validate coverage but presuming your tooling does make it easy? Point me to any gaps that concern and I could take a look.
Screenshots (if appropriate):
Checklist: