Skip to content

Pin Zig 0.17.0 and detect stale iOS build_root - #146

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

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

Conversation

@youfun

@youfun youfun commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Companion to GenericJam/mob#220 and the matching mob_new PR.

Zig 0.17.0 is now the exact pin (MobDev.Toolchain + .tool-versions). That matches the plan in mob's build_system_migration.md: the 0.17.0-dev.269+ebff43698 nightly was only for the macOS 26 SDK fix.

Also: mix mob.doctor fails ios/build.zig and ios/build_device.zig that still call b.build_root (Zig 0.17.0 removed the field). Line comments that mention the old name do not fail.

Verified: mix test test/mob_dev/toolchain_test.exs test/mix/tasks/mob_doctor_test.exs (29 passed), including rejection of the old nightly.

Not verified: full mix mob.deploy --native / device builds.

Install: mise install zig@0.17.0. Existing iOS apps must port off b.build_root (or regenerate from mob_new).

@youfun

youfun commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

Companion PRs: GenericJam/mob#220 and GenericJam/mob_new#107

youfun and others added 2 commits October 23, 2026 18:43
Doctor and native preflight now require zig 0.17.0 exactly, rejecting
the previous 0.17.0-dev.269 nightly. Existing ios/build.zig files that
still call b.build_root fail doctor; line comments naming the old
field do not. Companion to mob 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 cc03ceb into GenericJam:master Oct 24, 2026
7 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