Skip to content

Pin Zig 0.17.0 and replace bufPrintZ - #220

Merged
GenericJam merged 7 commits into
GenericJam:masterfrom
youfun:zig-0.17.0
Oct 24, 2026
Merged

GenericJam merged 7 commits into
GenericJam:masterfrom
youfun:zig-0.17.0

Conversation

@youfun

@youfun youfun commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Follows the plan in build_system_migration.md: the 0.17.0-dev.269+ebff43698 nightly existed because Zig 0.15.x could not link on the macOS 26 SDK. 0.17.0 is that stable.

This is one change across three repos (same branch name zig-0.17.0):

  • mob (this PR): pin + std.fmt.bufPrintZ → bufPrintSentinel in android/jni/mob_nif.zig
  • mob_dev: pin in MobDev.Toolchain + doctor fails stale iOS b.build_root
  • mob_new: pin + iOS templates glob Swift with std.Io.Dir.openDirAbsolute

mix mob.doctor still requires an exact zig version match (mise install zig@0.17.0).

What was verified on host (Zig 0.17.0)

  • zig ast-check on Mob Zig sources
  • zig build-obj -target aarch64-linux-android.24 for mob_nif.zig after the bufPrintSentinel change (and several sibling files that needed no edits)
  • zig build --help configure of current Android build.zig and of the updated iOS sim/device templates
  • Unfixed iOS templates fail configure with no field named 'build_root'

Not verified

  • Full native-lib / iOS binary link (no NDK sysroot / OTP tarball / device SDK in this run)
  • mix mob.deploy --native on Android or iOS
  • Runtime on a device or simulator

Existing apps must upgrade mob + mob_dev + app-owned iOS build.zig together. Android build.zig from current templates already configures on 0.17.0.

No Linear MOB-N (no API access from this contributor).

@youfun

youfun commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

Companion PRs: GenericJam/mob_dev#146 and GenericJam/mob_new#107

youfun and others added 2 commits October 23, 2026 18:43
0.17.0 is the stable with the macOS 26 SDK fix that 0.17.0-dev.269
was taken for. std.fmt.bufPrintZ is gone; post-mortem marker paths
use bufPrintSentinel. Companion to mob_dev and mob_new.
@GenericJam

Copy link
Copy Markdown
Owner

Maintainer update. I rebased this onto current master and added commits on top; thanks @youfun.

Added on top of the original change

  • Rebased over the OTP 29.1.2 release; .tool-versions keeps erlang 29.1.2.
  • Further 0.17.0 API fixes: std.mem.printSentinel (the stdlib marks bufPrintSentinel deprecated) and dupeSentinel in place of the removed dupeZ in mob_stored_queue.zig.
  • iOS templates: the Swift glob now calls b.dependOnDirectoryContents on mob/ios. Zig 0.17.0 caches the configure step, so without that a Swift file mob adds is missed until the Zig cache is cleared. I reproduced this; a regression test now builds twice with one cache.
  • mob.doctor: fails a glob that still uses b.build_root and warns when the glob is not tracked. It ignores comments and strings.
  • CI runs the pinned Zig, read from .tool-versions or priv/zig-version:
    • mob compiles mob_nif.zig for Android and runs every Android Zig test.
    • mob_dev has a macOS job for :requires_zig.
    • mob_new has a macOS job for the generated build.zig link tests.
  • CHANGELOG upgrade steps: mise use zig@0.17.0 in each app, and the iOS glob block.

Checked on real devices with Zig 0.17.0, using an app generated from the three branches. mix mob.deploy --native worked on all three: the Moto G (Android arm64) and the iPhone 17 simulator booted and rendered the home screen, and the physical iPhone SE built and launched.

Review

  • Codex rounds 1–3: DO NOT SHIP. Every finding is fixed.
  • Round 4 went to a reviewer subagent, because Codex was usage-limited: SHIP. Its nitpicks are fixed.

@GenericJam
GenericJam merged commit 31d12f3 into GenericJam:master Oct 24, 2026
4 checks passed
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.

2 participants