Skip to content

feat(rg): gate preprocessors with pre-glob - #1682

Merged
chaliy merged 1 commit into
mainfrom
2026-05-22-rg-batch-8
May 22, 2026
Merged

chaliy merged 1 commit into
mainfrom
2026-05-22-rg-batch-8

Conversation

@chaliy

@chaliy chaliy commented May 22, 2026

Copy link
Copy Markdown
Contributor

What

Makes rg apply unsupported preprocessor validation per searched file, respecting --pre-glob.

Why

Real rg only runs --pre for files matched by --pre-glob. Bashkit previously rejected unsupported preprocessors during option parsing, even when the preprocessor would not apply.

How

  • Stores --pre-glob rules on RgOptions.
  • Moves unsupported --pre validation into file read/search.
  • Propagates recursive file preprocessor errors through RgCollectedInputs.
  • Disables indexed search when a preprocessor is configured.
  • Adds unit and differential coverage for excluded vs included preprocessor globs.

Risk

  • Low / Medium
  • Recursive search error propagation changed for preprocessor-related reads, but default/no-pre behavior remains unchanged.

Checklist

  • Tests added or updated
  • Backward compatibility considered

@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 63f795b Commit Preview URL May 22 2026, 05:12 PM

@chaliy
chaliy merged commit a39cc2d into main May 22, 2026
34 checks passed
@chaliy
chaliy deleted the 2026-05-22-rg-batch-8 branch May 22, 2026 17:24
chaliy added a commit that referenced this pull request May 30, 2026
## What
Makes rg apply unsupported preprocessor validation per searched file,
respecting `--pre-glob`.

## Why
Real rg only runs `--pre` for files matched by `--pre-glob`. Bashkit
previously rejected unsupported preprocessors during option parsing,
even when the preprocessor would not apply.

## How
- Stores `--pre-glob` rules on `RgOptions`.
- Moves unsupported `--pre` validation into file read/search.
- Propagates recursive file preprocessor errors through
`RgCollectedInputs`.
- Disables indexed search when a preprocessor is configured.
- Adds unit and differential coverage for excluded vs included
preprocessor globs.

## Risk
- Low / Medium
- Recursive search error propagation changed for preprocessor-related
reads, but default/no-pre behavior remains unchanged.

## Checklist
- [x] Tests added or updated
- [x] Backward compatibility considered
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