ReviewOS

zig-utils/zig-regex

Build: support Zig 0.17.0-dev.1811 ArrayList API

#21
Closed chris opened this 11 days ago ·
11 days ago

Parent dependency: zig-utils/zig-js#626

Problem

Zig 0.17.0-dev.1811 removed ArrayList.getLast, so src/backtrack.zig no longer compiles at the greedy repetition result even though the list is provably non-empty after its mandatory initial append.

GitHub Actions evidence: zig-utils/zig-js/actions/runs/32258993747 reports src/backtrack.zig:991:31: error: no field or member function named 'getLast'.

Scope

  • Replace the removed convenience API with an explicit final-item access whose non-empty invariant is visible at the call site.
  • Preserve greedy match semantics, capture rollback, allocation-failure behavior, and compatibility with the repository's supported Zig 0.17 development floor.
  • Audit the owned source for any other getLast uses.

Acceptance

  • Focused and full zig-regex tests pass on the local supported compiler.
  • Analyze/compile succeeds with Zig 0.17.0-dev.1811.
  • The dependent zig-js build no longer reports the sibling error.
11 days ago

Implemented and pushed to main in 87e9ca2.

Validation:

  • zig build test on Zig 0.17.0-dev.1441+d5181a9c9
  • zig build test on the exact CI compiler, Zig 0.17.0-dev.1811+6716bf52e

The greedy path retains its non-empty invariant and longest-match result while avoiding the removed ArrayList.getLast API.

Sign in to comment on this issue.