Repository navigation
iOS release: scratch removed on every exit (MOB-425); release dead-strips + plugin no-dead-strip link check (MOB-471) - #136
Conversation
…ad-strips, plugin archives get a no-dead-strip undefined-symbol check (MOB-471) MOB-425: release_device.sh wrote ~100 MB of scratch with bare mktemp -d (ignores TMPDIR) and never removed BUILD_DIR. build_ipa/1 now runs it in NativeBuild.with_temp_build_dir/2 (MOB_RELEASE_BUILD_DIR); every scratch path is under it; a direct run makes its own under TMPDIR with an EXIT trap. MOB-471: the release link passes -Xlinker -dead_strip like mob_new's dev links. MobDev.Plugin.IosLinkCheck links each iOS cpp_archive plugin archive without -dead_strip and fails the build on any symbol the BEAM, mob core or the iOS SDK don't define (the MOB-470 class).
…e expands mob_dir (review)
|
Review: reviewer subagent (Codex rate-limited until 6:25 PM today): MERGE. Round 1 (6822636): no blocking findings. Should-fix: CI on f53cdb1: green (run 38460310349). |
Fixes MOB-425 and MOB-471.
MOB-425:
mix mob.release --iosno longer leaks its scratch (~100 MB a run)release_device.shused baremktemp -d(macOS ignores TMPDIR) forBUILD_DIR(never removed), the exqlite objects and the IPA staging dir (removed on success only), plus/tmp/actool_*.plist.Release.build_ipa/1now runs the script insideNativeBuild.with_temp_build_dir("release", …)(the MOB-313 helper, removed inafter) and passes the dir asMOB_RELEASE_BUILD_DIR; every scratch path is under it (Release.release_scratch_sh/0). A direct run of the script makes its own dir under$TMPDIRand removes it with an EXIT trap. MOB-313's decision record notes that release now follows it.MOB-471: release link dead-strips; plugin archives get a no-dead-strip undefined-symbol check
swiftclink passes-Xlinker -dead_strip, as mob_new'sios/build.zig/build_device.zigdo. A test asserts the release script and both templates agree.MobDev.Plugin.IosLinkCheckruns after every iOS (:ios_sim,:ios_device) cpp_archive build inbuild_plugin_static_archives/4(sim build, device build, release): it links the archive into a throwaway dylib without-dead_stripand fails the build on any unresolved symbol that the target's ERTS libs, mob core's iOS sources or the iOS SDK's.tbdstubs don't define, naming the plugin, symbols and referencing members. Allow-list derived from those inputs; the SDK is in whole because mob core autolinks frameworks (mob_scene3d's Filament needs OpenGL ES, which no manifest declares).decisions/2026-10-13-ios-release-dead-strips-and-plugin-link-check.md.Verification (Mac mini, 2026-10-13)
mix mob.new --ios) + default plugins + mob_whisper 0.1.2 + mob_scene3d 0.2.0:mix mob.release --iosleft$DARWIN_USER_TEMP_DIR/tmp.jP1HXE0aDY(108 MB).tmp.*/mob_release*dir inDARWIN_USER_TEMP_DIR, TMPDIR or /tmp; same with a forced failure (bogusios_dist_profile_uuid, fails after link + bundle at the profile step).mix mob.deploy --native --ioson iPhone 18 Pro sim (iOS 27) +mix mob.selftest: 4 passed, 0 failed, 2 skipped (location: no selftest; biometric: nothing enrolled).dl_get_sym,dl_load_library,dl_errorfromggml-backend-reg.o; 0.1.2 and mob_scene3d pass (~0.5 s each).mix test(full, macOS): 3054 passed. New tests:test/mob_dev/release_scratch_test.exs(runs the prologue with a fake TMPDIR, success and failure, and withMOB_RELEASE_BUILD_DIR),test/mob_dev/plugin/ios_link_check_test.exs(:macos_onlyfixture archives: MOB-470 shape fails, links with-dead_stripand not without; clean one passes; mob-core symbols only allowed with the mob checkout).Remaining in the user temp dir after a release, not ours: actool's ibtoold FIFOs and an empty
TemporaryDirectory.*(Xcode; actool ignores TMPDIR for these).Review: see comments.