Skip to content

chore(deps): update rust crate fancy-regex to 0.20.0 - #15715

Closed
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/fancy-regex-0.x
Closed

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/fancy-regex-0.x

Conversation

@renovate

@renovate renovate Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Type Update Change
fancy-regex workspace.dependencies minor 0.19.2 → 0.20.0

Release Notes

fancy-regex/fancy-regex (fancy-regex)

v0.20.0

Compare Source

Added
  • Add RegexOptionsBuilder::build_delegate_prefilter to disable building the prefilter (#​282)
  • Add RegexOptionsBuilder::start_bytes that returns the first bytes that can match a pattern so you can build your own prefilter (#​282)
  • Add RegexOptionsBuilder::required_bytes that returns the required bytes for a pattern to match (#​287)
  • Add RegexOptionsBuilder::max_prog_size / RegexBuilder::max_prog_size to cap the number of VM instructions emitted while compiling. Subroutine calls are inlined at compile time, so a self- or mutually-recursive pattern can expand without bound even while the recursion-depth cap is respected; this bounds the emitted instruction vector instead. Exceeding the cap returns CompileError::PatternTooComplex. Disabled by default. (#​298)
  • Implement support for variable length hard lookbehinds, by seeking backwards to candidate match start positions and then matching forward as usual. The reverse DFA honours delegate_size_limit and delegate_dfa_size_limit. (#​286, #​309)
  • Add RegexOptionsBuilder::delegate_dfa_skip_cache_capacity_check / RegexBuilder::delegate_dfa_skip_cache_capacity_check, enabled by default. Setting it to false makes the reverse DFA of a variable-length lookbehind strictly honour delegate_dfa_size_limit, so a too-small limit becomes a compile error. (#​309)
  • Add ByteSet::is_subset to test whether one byte set is a subset of another. (#​289)
Changed
  • If a lookbehind consists of an Alt containing only easy expressions and at least 4 branches (and no capture groups), compile it as a variable lookbehind (if the feature is enabled) instead of trying every branch as its own const-size lookbehind. One reverse-DFA delegate over the whole alternation is much cheaper per attempt, and grants a perf boost. (#​285)
  • Word boundaries (\b, \B, \<, \>) are no longer marked hard outside a lookbehind. regex-automata supports them, so a pattern like \b(?:foo|bar|baz)\b now compiles to a single delegated engine instead of one branch per alternative — previously it grew linearly with the number of alternatives. They remain hard inside a lookbehind, since regex-automata's reverse DFA can't run a variable-length lookbehind on unicode haystacks. The half-boundary variants (\<half, \>half) and \Z are still always hard.
  • The parser now tracks every capture group declared with the same name; Regex::capture_names reports the name for each of them, and named backrefs resolve to the last group with that name (#​177)
Fixed
  • The reverse lazy DFA built for a variable-length lookbehind failed to compile when it needed a larger cache capacity than the configured delegate_dfa_size_limit (or the default of 2 MiB); for example (?<=\p{L}{99,100})x failed to compile with default settings. The capacity is now rounded up to the minimum required. Ordinary delegates were not affected because the meta engine falls back to another engine when the lazy DFA cannot be built. (#​309)
  • delegate_dfa_size_limit now sets the lazy DFA cache capacity (hybrid_cache_capacity) as documented, instead of the fully compiled DFA size limit. It had been forwarded to the wrong regex-automata option since the switch from the regex crate. (#​307)
  • Fix bug with literal bytes being used in unicode mode unexpectedly: in Unicode mode, \xHH escapes above 0x7F now match the Unicode codepoint (as UTF-8 bytes) instead of the raw byte, so e.g. \xFF matches ÿ rather than the byte 0xFF. In bytes modes the raw byte is matched as before. (#​292)
  • Fix case-insensitive prefilter computation for non-ASCII class ranges that fold to characters with different lead bytes (e.g. (?i)[à-ÿ]), which previously could miss candidate start positions. (#​296)
  • Fix ^ / $ and their multi-line variants matching at the start/end of arbitrary-byte haystacks in Ascii and UnicodeBytes bytes modes, where the match position was not a UTF-8 codepoint boundary. (#​300)
  • Fix seek optimization dropping matches when conditionals had empty branches, e.g. (a)?b(?(1)c) no longer fails to match b. (#​304)
  • Fix hard variable-length lookbehind reverse DFA ignoring the caller's Unicode and bytes-mode settings, giving wrong results in non-Unicode bytes modes (e.g. (?<=(\w+)\1)x on ééx). (#​310)

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@codspeed

codspeed Bot commented Oct 24, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 3.39%

1 warning, 1 note

⚠️ 118 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

ℹ️ 1 benchmark has no flamegraph

The flamegraph wasn't generated: most of the time was spent in runtime internals, which would leave nothing useful to analyze.

See affected benchmarks

❌ 1 regressed benchmark
✅ 400 untouched benchmarks
⏩ 70 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ CPU Simulation sort_reverse_utf8_locale 79.2 ms 82 ms -3.39%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing renovate/fancy-regex-0.x (c22cf12) with main (076359f)

Open in CodSpeed

Footnotes

  1. 70 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@xtqqczze

Copy link
Copy Markdown
Collaborator

Duplicate of #15846.

@xtqqczze xtqqczze closed this Oct 26, 2026
@renovate

renovate Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (0.20.0). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate
renovate Bot deleted the renovate/fancy-regex-0.x branch October 26, 2026 00:26
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