Skip to content

std.regex: drop redundant bmatch run from the test suite - #11046

Merged
thewilsonator merged 3 commits into
dlang:masterfrom
kubo39:std-regex-drop-redundant-bmatch-test
Jul 22, 2026
Merged

std.regex: drop redundant bmatch run from the test suite#11046
thewilsonator merged 3 commits into
dlang:masterfrom
kubo39:std-regex-drop-redundant-bmatch-test

Conversation

@kubo39

@kubo39 kubo39 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Rationale

match and bmatch are equivalent (both pick the engine from the pattern), so running run_tests!match() only.

Pre-review checklist

  • I have performed a self-review of my code.
  • [ ] If my PR fixes a bug or introduces a new feature, I have added thorough tests.
  • [ ] If my changes are non-trivial and do not concern a reported issue, I have added a changelog entry.

@kubo39
kubo39 requested a review from DmitryOlshansky as a code owner June 28, 2026 11:54

@DmitryOlshansky DmitryOlshansky left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since engines are picked from pattern it makes it truly important to run all engines in test suit. So just dropping bmatch is not a good solution, what is needed is a way to pick engine at least internally.

@kubo39

kubo39 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

At first I thought, but since that pattern — explicitly forcing the backtracking engine — can't be reached through the public API, I wonder if it's worth it.

@DmitryOlshansky

Copy link
Copy Markdown
Member

It's not public but the engine better be tested even if currently it is not selected for the pattern.

@thewilsonator

Copy link
Copy Markdown
Contributor

It wold seem to me the solution here is (potentially via a private API) to force the engine irrespective of the pattern, and then test all of the engines on whatever the set of patterns comprise the test suite.

@kubo39

kubo39 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

Okay, I'll add the internal helper later.

@DmitryOlshansky

Copy link
Copy Markdown
Member

Seems fine, go ahead and merge?

kubo39 added 2 commits July 21, 2026 22:35
match and bmatch are equivalent (both pick the engine from the pattern), so
running run_tests!match() only.
@0xEAB
0xEAB force-pushed the std-regex-drop-redundant-bmatch-test branch from b2562f5 to a8bda93 Compare July 21, 2026 20:35
@0xEAB

0xEAB commented Jul 21, 2026

Copy link
Copy Markdown
Member

Rebased. Needed due to CI changes.

@0xEAB

0xEAB commented Jul 21, 2026

Copy link
Copy Markdown
Member

With regard to 3f18cfa:
It’s just another bump commit; CI failed for odd reasons. Filed a report: dlang/ci#497

@thewilsonator
thewilsonator merged commit a4d27d5 into dlang:master Jul 22, 2026
9 of 10 checks passed
@kubo39
kubo39 deleted the std-regex-drop-redundant-bmatch-test branch July 22, 2026 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants