Skip to content

feat: add brace expansion support for glob patterns#368

Merged
karthiknadig merged 2 commits intomainfrom
feat/issue-366
Mar 2, 2026
Merged

feat: add brace expansion support for glob patterns#368
karthiknadig merged 2 commits intomainfrom
feat/issue-366

Conversation

@karthiknadig
Copy link
Member

Adds {a,b} brace expansion support to glob pattern handling, enabling patterns like ./**/{bin,Scripts}/python{,.exe} to work as search paths.

Changes

  • Brace expansion in pet-fs/src/glob.rs: expands {a,b} groups before passing patterns to the glob crate (which doesn't support braces natively)
  • Safety cap: expansion limited to 1024 patterns to prevent exponential blowup
  • Progress logging: trace-level logs during glob expansion showing pattern, match count, and elapsed time
  • Robust detection: is_glob_pattern() correctly identifies brace patterns (requires matched {...} pair with comma, scans all groups)
  • JSONRPC docs: documented brace expansion syntax and example in searchPaths
  • Comprehensive tests: 27 new tests covering edge cases, cap behavior, filesystem integration, and performance

Fixes #366

@github-actions
Copy link

github-actions bot commented Mar 1, 2026

Performance Report (Linux) ➖

Metric PR (P50) PR (P95) Baseline (P50) Delta Change
Server Startup 1ms 1ms 1ms 0ms 0%
Full Refresh 97ms 279ms 96ms 1ms 0%

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

@github-actions
Copy link

github-actions bot commented Mar 1, 2026

Test Coverage Report (Linux)

Metric Value
Current Coverage 64.0%
Base Branch Coverage 62.7%
Delta 1.3% ✅

Coverage increased! Great work!

@github-actions
Copy link

github-actions bot commented Mar 1, 2026

Performance Report (macOS)

Metric PR (P50) PR (P95) Baseline (P50) Delta
Server Startup 55ms 500ms 66ms -11ms
Full Refresh 96ms 28527ms 114ms -18ms

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

@github-actions
Copy link

github-actions bot commented Mar 1, 2026

Test Coverage Report (Windows)

Metric Value
Current Coverage 60.21%
Base Branch Coverage 58.89%
Delta 1.32% ✅

Coverage increased! Great work!

@github-actions
Copy link

github-actions bot commented Mar 1, 2026

Performance Report (Windows) ➖

Metric PR (P50) PR (P95) Baseline (P50) Delta Change
Server Startup 11ms 13ms 9ms 2ms 22.2%
Full Refresh 193ms 553ms 165ms 28ms 17%

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

@karthiknadig karthiknadig marked this pull request as ready for review March 2, 2026 20:50
@karthiknadig karthiknadig enabled auto-merge (squash) March 2, 2026 20:50
@vs-code-engineering vs-code-engineering bot added this to the March 2026 milestone Mar 2, 2026
@karthiknadig karthiknadig merged commit c12013e into main Mar 2, 2026
30 checks passed
@karthiknadig karthiknadig deleted the feat/issue-366 branch March 2, 2026 22:06
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.

accept direct path to interpreter as search path

2 participants