-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Regex - Optional Unicode properties support, and prefer brewed libpcre on MacOS #4712
Conversation
Required for PCRE_UCP option that introduced by libpcre 8.10+.
CrcleCI has too old PCRE. |
We should find a way to degrade gracefully as we do with openssl. Use |
@RX14 thanks, I'll do. Anyway it should be optional flag. |
2) prefer libpcre instead of pcre to build correctly on MacOS with newer brewed libpcre.
CircleCI is strange again. std spec built ok, but all_spec not. |
(Regex.new("\\w", Regex::Options::UCP).match "à").should be_truthy | ||
end | ||
else | ||
pending "PCRE built without Unicode properties support" do |
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.
I don't think this is necessary. Is it done anywhere else in specs?
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.
Nowhere. It's just declaration that sometimes Crystal will be built with UCP-friendly PCRE only.
I'll close this pull request because want to change regex engine to successor (PCRE2) that built with UCP support by default everywhere and has well known stable API. |
Current crystal depends on
pcre
instead oflibpcre
. It breaks linking to newest PCRE under MacOS.I have changed link attribute and add specs for UCP support.
UCP support disabled by default due to bad performance, but can be used by "(*UCP)" flag or by
Regex::Options::UCP
option.This pull request depends on PCRE 8.10 or above.
Fixes #4704.