Skip to content

Bump mojo-regex from 0.10.0 to 0.21.0#293

Open
msaelices wants to merge 3 commits into
modular:mainfrom
msaelices:regex-0.21.0-bump
Open

Bump mojo-regex from 0.10.0 to 0.21.0#293
msaelices wants to merge 3 commits into
modular:mainfrom
msaelices:regex-0.21.0-bump

Conversation

@msaelices

Copy link
Copy Markdown
Contributor

Updates the mojo-regex recipe to v0.21.0 (pinned to ce1be86).

Changes

  • context.version: 0.10.0 -> 0.21.0
  • context.mojo_version: =0.26.2 -> =1.0.0b3.dev2026062806 (matches the project's pixi.toml pin; the codebase has been migrated through the 1.0.0b1/b2/b3 breaking changes, including the AnyOrigin -> UntrackedOrigin origin-model migration, and requires this nightly)
  • source[0].rev: pinned to the v0.21.0 release commit
  • Description refreshed: current benchmark win rates (97% vs Python re, 83% vs Rust regex, from the repo's benchmarks/results/comparison.md) and a note on the new compile-time pattern specialization feature.

Highlights since 0.10.0

  • Compile-time pattern specialization (new in 0.21.0): pass the pattern as a comptime parameter (search["hello"](text)) and the parser + DFA compiler run inside Mojo's comptime interpreter, embedding the automaton in the binary: no runtime compilation, no per-call pattern hash or cache probe, and invalid patterns fail the build.
  • Compiler-tracked match lifetimes: Match[origin] is parameterized on the backing-text origin end to end.
  • Mojo 1.0.0b3 nightly compatibility, zero compiler warnings, 389 tests.
  • Numerous SIMD hot-path optimizations (two-byte memchr-style literal scan, bounds-check recovery under 1.0.0b1).

Supersedes #264.

rattler-build fetches the rev as a git ref and GitHub only serves
full SHAs, so the short form fails with 'couldn't find remote ref'.
@msaelices

Copy link
Copy Markdown
Contributor Author

Thanks for the "OK to test" label. The arm failure was the short commit SHA in source[0].rev (GitHub only serves full SHAs to git fetch); fixed by pinning the full 40-char SHA.

Heads-up on the next run: the build will likely fail resolving mojo-compiler =1.0.0b3.dev2026062806. mojo-regex 0.21.0 requires the 1.0.0b3 origin model (UntrackedOrigin), which is currently nightly-only, and this repo builds against the stable max channel (tops out at 1.0.0b2 today). I will update the pin to =1.0.0b3 as soon as the stable b3 ships; feel free to leave this PR parked until then.

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.

2 participants