-
-
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
Implement Regex
engine on PCRE2
#12856
Conversation
d952eb4
to
979f01c
Compare
Nice! So this one seems to be working better than the last one. I ran the specs on https://github.com/jwoertink/CrystalEmail to test
|
No issues on my M2 via nix-shell (requires adding |
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.
Just a minor question
end | ||
end | ||
|
||
class_getter general_context 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.
shouldn't this be private (or protected)?
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.
The entire Regex::PCRE2
namespace is :nodoc:
so I think visibility doesn't matter much. I suppose it could be protected, though.
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.
yes, it's just nitpicking, I was wondering if there were a reason to leave it public
This is a re-issue of #12840 which was reverted due to errors. The updated branch includes several bugfixes and enhancements.
This is an initial implementation of a
Regex
engine backend based on PCRE2 (see #12790).All existing regex specs succeed with PCRE2 🎉
This is an MVP and does not include JIT compilation (I'm planning a follow-up).
PCRE2 is currently not automatically selected. It's opt-in via the compiler flag
-Dforce_pcre2
.If you have Crystal software that makes heavy use of regular expressions, please give this patch a try in order to identify potential issues in practical use cases. Performance comparisons are also welcome.
libpcre2-8
(this is also the package name on some systems).pkg-config
needs the.pc
configuration which may require installing the devel package oflibpcre2
.Significant changes from #12840: