Skip to content

Pin Zig 0.17.0 and glob iOS Swift via openDirAbsolute - #107

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

GenericJam merged 8 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_dev PR.

Generated .tool-versions / priv/zig-version pin 0.17.0. iOS build.zig / build_device.zig templates glob $mob_dir/ios/*.swift with std.Io.Dir.openDirAbsolute because Zig 0.17.0 removed Build.build_root.

Verified: generator lockstep tests and the iOS glob tests (sim + device). zig build --help configure of the rendered templates succeeds on 0.17.0; the old b.build_root.handle.openDir form fails configure.

Not verified: full iOS binary link / device deploy.

New apps get this automatically. Existing apps need Zig 0.17.0 plus a port (or regenerate) of the two iOS build files.

@youfun

youfun commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

Companion PRs: GenericJam/mob#220 and GenericJam/mob_dev#146

youfun and others added 2 commits October 23, 2026 18:43
Generated .tool-versions now pin 0.17.0. Zig 0.17.0 removed
Build.build_root; iOS templates open {mob_dir}/ios with
std.Io.Dir.openDirAbsolute. Companion to mob and mob_dev.
@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 2233a2c 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