Skip to content

Android NIF builds on both Zig pins; pin Keyboard.dismiss and Android blur in tests - #226

Merged
GenericJam merged 1 commit into
masterfrom
fix/zig-nightly-compat
Oct 24, 2026
Merged

GenericJam merged 1 commit into
masterfrom
fix/zig-nightly-compat

Conversation

@GenericJam

Copy link
Copy Markdown
Owner

The release gate for 0.9.26 (Codex) said DO NOT SHIP.

Blocking. mob_dev 0.7.30 allows mob ~> 0.9.25 and pins the Zig nightly 0.17.0-dev.269. That nightly has no std.mem.printSentinel, which #220 introduced in android/jni/mob_nif.zig. So an app that kept mob_dev 0.7.30 and updated to mob 0.9.26 would have no Zig version that builds Android. Fix: the four post-mortem marker sites now format through a local printZ built on std.fmt.bufPrint, which exists in both toolchains.

Should-fix.

  • Mob.Keyboard.dismiss/1's test now runs the NIF call path against a fake NIF, via __dismiss__/2.
  • The Android mob_send_blur is pinned to sendIdentityEvent in native_event_handle_test.exs.

Verification.

  • zig build-obj -target aarch64-linux.24.0-android -Mroot=android/jni/mob_nif.zig passes on both 0.17.0-dev.269+ebff43698 and 0.17.0. Before the fix it failed on the nightly with printSentinel missing.
  • The Android Zig unit tests pass on both versions.
  • With Zig 0.17.0: mix test passes 2114 (38 excluded); format, credo --strict and compile --warnings-as-errors are clean.

… blur in tests

The 0.9.26 release gate found that an app keeping mob_dev 0.7.30 (Zig
0.17.0-dev.269) could resolve this mob, whose std.mem.printSentinel the
nightly lacks. Format the post-mortem marker paths through a local printZ on
std.fmt.bufPrint, which both toolchains have. Compiled for aarch64 Android on
both.

Mob.Keyboard.dismiss/1's test now runs the call path against a fake NIF, and
mob_send_blur is pinned to sendIdentityEvent.
@GenericJam
GenericJam merged commit ea6f06b into master Oct 24, 2026
4 checks passed
@GenericJam
GenericJam deleted the fix/zig-nightly-compat branch October 24, 2026 06:26
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.

1 participant