Skip to content

Conversation

@TwoFX
Copy link
Member

@TwoFX TwoFX commented Oct 29, 2025

No description provided.

@TwoFX TwoFX requested a review from kim-em as a code owner October 29, 2025 06:29
@TwoFX TwoFX changed the title Backport KMP fixes to 4.25.0 chore: backport KMP fixes to 4.25.0 Oct 29, 2025
@TwoFX TwoFX added the changelog-no Do not include this PR in the release changelog label Oct 29, 2025
@TwoFX TwoFX force-pushed the markus/backport-kmp-fixes branch from 9ade2b6 to 60e3087 Compare October 29, 2025 07:01
TwoFX added 2 commits October 29, 2025 08:14
This PR ensures that searching for an empty string returns the expected
pattern of alternating size-zero matches and size-one rejects.

In particular, splitting by an empty string returns an array formed of
the empty string, all of the string's characters as singleton strings,
followed by another empty string. This matches the [Rust
behavior](https://doc.rust-lang.org/std/primitive.str.html#method.split),
for example.
This PR fixes the KMP implementation, which did incorrect bookkeeping of
the backtracking process, leading to incorrect starting ranges of
matches.

The new implementation does not require `partial` anywhere.
@TwoFX TwoFX force-pushed the markus/backport-kmp-fixes branch from 60e3087 to 80d2a1a Compare October 29, 2025 07:14
@TwoFX TwoFX merged commit ba0f86d into leanprover:releases/v4.25.0 Oct 29, 2025
14 checks passed
@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Oct 29, 2025
@leanprover-bot
Copy link
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI can not be attempted yet, as the nightly-testing-2025-10-20 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-manual, reference manual CI should run now. You can force reference manual CI using the force-manual-ci label. (2025-10-29 08:04:42)

leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Oct 29, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Oct 29, 2025
@leanprover-community-bot leanprover-community-bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Oct 29, 2025
@leanprover-community-bot
Copy link
Collaborator

Mathlib CI status (docs):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builds-mathlib CI has verified that Mathlib builds against this PR changelog-no Do not include this PR in the release changelog toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants