Repository navigation
chore(deps): update rust crate fancy-regex to 0.20.0 - #15846
Merged
Merged
Conversation
1 task
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.19.2→0.20.0Release Notes
fancy-regex/fancy-regex (fancy-regex)
v0.20.0Compare Source
Added
RegexOptionsBuilder::build_delegate_prefilterto disable building the prefilter (#282)RegexOptionsBuilder::start_bytesthat returns the first bytes that can match a pattern so you can build your own prefilter (#282)RegexOptionsBuilder::required_bytesthat returns the required bytes for a pattern to match (#287)RegexOptionsBuilder::max_prog_size/RegexBuilder::max_prog_sizeto 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 returnsCompileError::PatternTooComplex. Disabled by default. (#298)delegate_size_limitanddelegate_dfa_size_limit. (#286, #309)RegexOptionsBuilder::delegate_dfa_skip_cache_capacity_check/RegexBuilder::delegate_dfa_skip_cache_capacity_check, enabled by default. Setting it tofalsemakes the reverse DFA of a variable-length lookbehind strictly honourdelegate_dfa_size_limit, so a too-small limit becomes a compile error. (#309)ByteSet::is_subsetto test whether one byte set is a subset of another. (#289)Changed
\b,\B,\<,\>) are no longer marked hard outside a lookbehind. regex-automata supports them, so a pattern like\b(?:foo|bar|baz)\bnow 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\Zare still always hard.Regex::capture_namesreports the name for each of them, and named backrefs resolve to the last group with that name (#177)Fixed
delegate_dfa_size_limit(or the default of 2 MiB); for example(?<=\p{L}{99,100})xfailed 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_limitnow 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 theregexcrate. (#307)\xHHescapes above0x7Fnow match the Unicode codepoint (as UTF-8 bytes) instead of the raw byte, so e.g.\xFFmatchesÿrather than the byte0xFF. In bytes modes the raw byte is matched as before. (#292)(?i)[à-ÿ]), which previously could miss candidate start positions. (#296)^/$and their multi-line variants matching at the start/end of arbitrary-byte haystacks inAsciiandUnicodeBytesbytes modes, where the match position was not a UTF-8 codepoint boundary. (#300)(a)?b(?(1)c)no longer fails to matchb. (#304)(?<=(\w+)\1)xonééx). (#310)Closes #15715.