iOS release: fix erl_errno shim newline + preflight the driver table#14
Merged
Conversation
Two issues that break `mix mob.release --ios` (the dev build is unaffected; both only bite the App Store release path, surfaced shipping a 1.20/OTP29 app): 1. The erl_errno_id_unknown weak-stub line used `printf '%s\\n'` inside the ~S (raw) release-script heredoc, so bash received the two backslashes verbatim and printf wrote a literal backslash-n into erl_errno_id_compat.c — clang then rejects the trailing `}\n`. Use `printf '%s\n'` (one backslash) so a real newline is emitted. Added a regression guard to release_script_test. 2. The release links a per-app priv/generated/driver_tab_ios.c, but the dev build uses the built-in Zig table and `mix mob.regen_driver_tab` defaults to Zig, so a project that never ran it with `--format c` dies deep in release_device.sh with a cryptic `cc: no such file`. Add a build_ipa preflight that fails early with the exact command to run. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
GenericJam
added a commit
that referenced
this pull request
Jun 2, 2026
…reflight) Ships PR #14: printf '%s\n' (real newline in the erl_errno_id_unknown shim) and a build_ipa preflight that fails early with the regen command when priv/generated/driver_tab_ios.c is missing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two issues that break
mix mob.release --iosagainst the Elixir 1.20-rc.5 / OTP 29 runtime (OTP hash7d46fdd4). Both only affect the App Store release path — the dev build is unaffected — which is why they hadn't surfaced before (AirCartMax / Code to Cloud shipped on an older OTP). Found while shipping a Livebook-on-mob app.1.
erl_errno_id_unknownshim written with a literal\nThe weak-stub line was
printf '%s\\n' '…' > erl_errno_id_compat.cinside the~S"""(raw, no-escape) release-script heredoc. The two backslashes reach bash verbatim, soprintf '%s\\n'emits a literal backslash-ninto the C file and clang rejects the trailing}\n:Fix:
printf '%s\n'(one backslash) so a real newline is emitted. This matches the working SLIM-logprintfelsewhere in the same heredoc. Added a regression guard torelease_script_test(assert sh =~ ~S|printf '%s\n'…|,refute sh =~ ~S|printf '%s\\n'|).2. Cryptic failure when
priv/generated/driver_tab_ios.cis missingThe iOS release links a per-app static-NIF driver table from
priv/generated/driver_tab_ios.c, but the dev build uses Mob's built-in Zig table andmix mob.regen_driver_tabdefaults to Zig. A project that only ever did dev builds (or ran regen without--format c) dies deep inrelease_device.shwithcc: no such file or directory: 'priv/generated/driver_tab_ios.c'.Fix: a
build_ipapreflight (check_driver_table/0) that fails early via the existing{:error, _}path with the exact command to run (mix mob.regen_driver_tab --format c). Chosen over auto-regen because--format ctables are meant to be hand-editable, so silently regenerating could clobber edits.Verification
mix test test/mob_dev/release_script_test.exs→ 35 passed (incl. new guard).Not included
A third issue — the OTP 29 iOS
libbeam.a(hash7d46fdd4) shipping botherl_posix_str.oanderl_errno_str.o, each defining_erl_errno_id(ld64 duplicate-symbol; zig/LLD tolerates it) — lives in the OTP cross-build / published tarball, not here. Tracked separately.🤖 Generated with Claude Code