[Pkg-rust-maintainers] Bug#926333: Bug#926333: PCRE2 support
Jonas Smedegaard
jonas at jones.dk
Sat Mar 14 10:57:58 GMT 2020
Quoting Martin Renold (2020-03-14 11:36:08)
> I'd also like PCRE2 to be enabled. Stumbled over it because emacs/ivy's code search used the "--pcre2" switch without checking whether it was available.
>
> Upstream provides .deb packages that have it enabled, statically linked it seems:
> https://github.com/BurntSushi/ripgrep/blob/master/ci/build_deb.sh#L41-L43
>
> When building manually I had to use 'cargo build --features pcre2 --release'
>
> Quote README:
> * ripgrep has optional support for switching its regex engine to use PCRE2.
> Among other things, this makes it possible to use look-around and
> backreferences in your patterns, which are not supported in ripgrep's default
> regex engine. PCRE2 support can be enabled with `-P/--pcre2` (use PCRE2
> always) or `--auto-hybrid-regex` (use PCRE2 only if needed).
I don't know ripgrep specifically, but from my work on licensecheck it
is my experience that RE2 engine is quite powerful compared to PCRE2, so
reading above I recommend to try "--auto-hybrid-regex" before "--pcre2"
(and report as a bug if "--auto-hybrid-regex" fails.
If those options are runtime options both available when ripgrep is
built with pcre2 support, then I sugges to encourage reverse
dependencies that hardcode "--pcre2" to try patch the code to instead
use "--auto-hybrid-regex".
- Jonas
--
* Jonas Smedegaard - idealist & Internet-arkitekt
* Tlf.: +45 40843136 Website: http://dr.jones.dk/
[x] quote me freely [ ] ask before reusing [ ] keep private
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-rust-maintainers/attachments/20200314/bfda1aaa/attachment-0001.sig>
More information about the Pkg-rust-maintainers
mailing list