Skip to content

uucore, expr: centralize regex in uucore and adopt fancy-regex leftmost-longest - #14531

Draft
wtcpython wants to merge 1 commit into
uutils:mainfrom
wtcpython:uucore-regex
Draft

uucore, expr: centralize regex in uucore and adopt fancy-regex leftmost-longest#14531
wtcpython wants to merge 1 commit into
uutils:mainfrom
wtcpython:uucore-regex

Conversation

@wtcpython

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread Cargo.toml Outdated
num-prime = "0.5.0"
num-traits = "0.2.19"
fancy-regex = { version = "0.19.1", default-features = false, features = [
fancy-regex = { version = "0.19.2", default-features = false, features = [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps we could move the feature selection to src/uucore/Cargo.toml

@codspeed-hq

codspeed-hq Bot commented Sep 13, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 3.59%

❌ 5 regressed benchmarks
✅ 232 untouched benchmarks
⏩ 180 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory expand_custom_tabstops[50000] 101.7 KB 105.8 KB -3.86%
Memory cut_characters_long_lines 103.2 KB 107.3 KB -3.81%
Simulation hostname_basic 426.7 µs 443.2 µs -3.72%
Memory df_deep_directory 115.4 KB 119.5 KB -3.42%
Memory cksum_multiple_files 125.9 KB 130 KB -3.15%

Tip

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


Comparing wtcpython:uucore-regex (257233c) with main (b125b38)

Open in CodSpeed

Footnotes

  1. 180 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

This comment was marked as outdated.

@github-actions

github-actions Bot commented Sep 13, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/rm/isatty (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/tail-n0f (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/seq/seq-epipe is now passing!

…st-longest

Centralize regular expression parsing and POSIX error checking into a new
`uucore::regex` module behind the `regex` feature flag. Upgrade fancy-regex
to 0.19.2 with the leftmost_longest feature to satisfy POSIX matching rules.
Migrate uu_expr to delegate regex handling to uucore::regex::bre_to_ere.
@oech3

oech3 commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Conflicts

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.

3 participants