Regex - Optional Unicode properties support, and prefer brewed libpcre on MacOS#4712
Closed
akzhan wants to merge 4 commits intocrystal-lang:masterfrom
Closed
Regex - Optional Unicode properties support, and prefer brewed libpcre on MacOS#4712akzhan wants to merge 4 commits intocrystal-lang:masterfrom
akzhan wants to merge 4 commits intocrystal-lang:masterfrom
Conversation
Required for PCRE_UCP option that introduced by libpcre 8.10+.
Contributor
Author
|
CrcleCI has too old PCRE. |
Member
|
We should find a way to degrade gracefully as we do with openssl. Use |
Contributor
Author
|
@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.
Contributor
Author
|
CircleCI is strange again. std spec built ok, but all_spec not. |
RX14
reviewed
Jul 23, 2017
| (Regex.new("\\w", Regex::Options::UCP).match "à").should be_truthy | ||
| end | ||
| else | ||
| pending "PCRE built without Unicode properties support" do |
Member
There was a problem hiding this comment.
I don't think this is necessary. Is it done anywhere else in specs?
Contributor
Author
There was a problem hiding this comment.
Nowhere. It's just declaration that sometimes Crystal will be built with UCP-friendly PCRE only.
Contributor
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current crystal depends on
pcreinstead 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::UCPoption.This pull request depends on PCRE 8.10 or above.
Fixes #4704.