Skip to content

iOS release build: glob ios/*.swift so new mob Swift files don't break builds#13

Merged
GenericJam merged 3 commits into
masterfrom
ios-swift-glob
May 27, 2026
Merged

iOS release build: glob ios/*.swift so new mob Swift files don't break builds#13
GenericJam merged 3 commits into
masterfrom
ios-swift-glob

Conversation

@GenericJam
Copy link
Copy Markdown
Owner

Summary

  • The release (mix mob.release) swiftc input hardcoded the mob Swift file list (MobViewModel.swift, MobRootView.swift, MobGpuView.swift).
  • When a new mob Swift file lands — e.g. MobGpuView.swift, referenced by MobRootView.swift — any build that doesn't list it fails with "cannot find 'MobGpuView' in scope" (+ cascading onChange errors in MobRootView.swift). This is the master iOS build breakage class.
  • Fix: glob $MOB_DIR/ios/*.swift instead of listing files by name, so a newly-added mob Swift source is compiled automatically and never again requires a release.ex edit.
  • mob/ios/ contains exactly the 3 SwiftUI sources (no test/standalone files), so the glob compiles the same set today.

Test plan

  • release_script_test.exs updated to assert the glob (and that the per-file list is gone); 35/35 pass
  • mix format / mix credo --strict (changed files) clean
  • Pre-push (format / credo / compile --warnings-as-errors) passed

Note: the mob_dev full suite has a pre-existing flake in mob_enable_test.exs (passes in isolation, flakes 5–8 in the async full run on the unmodified base too) — unrelated to this change.

🤖 Generated with Claude Code

GenericJam and others added 3 commits May 25, 2026 22:57
Device release fixes surfaced shipping the Code-To-Cloud orchestra app:

- Use the real OpenSSL crypto + ssl instead of the md5/no-op shims. Android
  gates on real_crypto_available?/1 (stub only when crypto.a is absent); iOS
  stops compiling the shim crypto/ssl into BEAMS_DIR (they shadowed the real
  crypto-5.9/ssl-11.7 on the -pa path) and links crypto.a + libcrypto.a so the
  NIF resolves. Fixes ":ssl.versions/0 undefined" / supports/1 -> [] crashing
  every TLS connect on device.
- Keep :compiler in the iOS slim-strip — Ecto.Migrator compiles .exs
  migrations at runtime; stripping it boots to {:badmatch, compiler.app}.
- iOS build: compile MobGpuView.swift, read driver_tab from priv/generated,
  add the erl_errno_id_unknown weak stub for libbeam's erl_posix_str.o.

Tests cover each (incl. "no shim generated"); full suite green (1404).
Decisions recorded in decisions/2026-05-25-*.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
When the compiling Elixir's minor differs from the Elixir bundled in the
device OTP tarball, beams can call functions the runtime lacks (e.g. `x in
list` -> Enum.__in__/2 under 1.20, absent in 1.19.5) -> :undef at boot ->
black screen with no error. OtpDownloader.ensure/3 now compares
System.version() against the tarball's elixir.app vsn at major.minor and
prints a loud stderr warning on mismatch (warn, not fail — rc/patch diffs are
fine and a hard fail would block legit builds). Pure elixir_skew/2 +
bundled_elixir_version/1 are tested. Full suite green (1411).

See decisions/2026-05-26-elixir-version-skew-warning.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The release swiftc input hardcoded MobViewModel/MobRootView/MobGpuView.swift.
When a new mob Swift file lands (e.g. MobGpuView.swift, which MobRootView
references), a build that doesn't list it fails with "cannot find '<Type>' in
scope" — that's how master's iOS build broke. Globbing ios/*.swift
auto-includes new files, so adding a mob Swift source never again requires a
release.ex edit.

Update the release-script test to assert the glob (and that the per-file list
is gone) instead of the literal MobGpuView.swift line.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@GenericJam GenericJam merged commit 6b3e997 into master May 27, 2026
3 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.

1 participant