-
Notifications
You must be signed in to change notification settings - Fork 296
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
Start removing std::regex #427
Conversation
// 0 1 2 3 4 5 6 7 8 9 10 | ||
if (version.size() < 10) return false; | ||
auto first = version.begin(); | ||
if (!P::is_ascii_digit(*first++)) return false; |
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.
Note to self/others: it would be really nice to not have yet another parser for this vs the one in DateVersion. No change requested.
// - v?<X>.<Y><whatever> -> <X>.<Y>.0-vcpkg<abitag> | ||
// - v?<X>.<Y>.<Z><whatever> -> <X>.<Y>.<Z>-vcpkg<abitag> | ||
// - anything else -> 0.0.0-vcpkg<abitag> | ||
std::string reformat_version(StringView version, StringView abi_tag); |
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.
std::string reformat_version(StringView version, StringView abi_tag); | |
std::string add_abitag_version_suffix(StringView version, StringView abi_tag); |
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.
Since it doesn't look like vcpkg::reformat_version is exercised unless a nuget binary or asset cache is used, I would like to see some unit tests added for that (and renamed as commented before). Other than that LGTM!
@BillyONeal there are unit tests for it already (hence why I'm confident that the new code is equivalent to the old code :P) |
"cool beans" |
No description provided.