Skip to content

feat(rg): support pcre2 patterns#1719

Merged
chaliy merged 1 commit into
mainfrom
2026-05-23-rg-batch-40
May 23, 2026
Merged

feat(rg): support pcre2 patterns#1719
chaliy merged 1 commit into
mainfrom
2026-05-23-rg-batch-40

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented May 23, 2026

What

Add PCRE2-compatible matching for rg via the existing fancy-regex engine. -P, --pcre2, --engine=pcre2, and --auto-hybrid-regex now route search matching through the PCRE2-compatible matcher instead of being parse-only no-ops.

Why

Real ripgrep supports look-around and backreferences under PCRE2. Bashkit rg previously accepted these flags but still used Rust regex, so PCRE2-only patterns failed or diverged from real rg.

How

Introduce an RgMatcher abstraction over Rust regex and fancy-regex, update output/color/replacement paths to use it, update help text, and add real-rg differential cases for lookahead, lookbehind with -o, and backreferences.

Risk

  • Medium
  • The matcher abstraction touches common rg output paths, though default Rust regex behavior remains the default path.

Checklist

  • Tests added or updated
  • Backward compatibility considered
  • cargo fmt && just pre-pr passed locally

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bashkit 290a388 Commit Preview URL May 23 2026, 06:31 PM

@chaliy chaliy merged commit 14033c2 into main May 23, 2026
34 checks passed
@chaliy chaliy deleted the 2026-05-23-rg-batch-40 branch May 23, 2026 18:52
@chaliy chaliy mentioned this pull request May 24, 2026
4 tasks
chaliy added a commit that referenced this pull request May 24, 2026
## What
Replace Python CI usage of `PyO3/maturin-action@v1` with explicit
`python -m pip install "maturin>=1.4,<2.0"` plus `python -m maturin
build` commands.

## Why
Main went red after the #1719 merge because Python CI hit
infrastructure/action failures: one checkout auth failure and one
`PyO3/maturin-action@v1` JavaScript error, `TypeError: candidates is not
iterable`, in the Python 3.13 build path. Rerunning restored main, but
the workflow should avoid the brittle action path.

## How
Keep the existing Rust/setup/cache flow, install maturin directly under
the selected Python interpreter, and invoke the same build arguments
from shell in test, examples, and build-wheel jobs.

## Risk
- Low
- This keeps the same maturin version range already declared by the
project and preserves the existing wheel build commands.

## Checklist
- [x] YAML parses locally
- [x] `git diff --check` passed
- [x] `just pre-pr` passed locally
- [x] Main Python workflow rerun is green
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant