Skip to content

fix(tooling): correct Zig install guidance - #51

Merged
GenericJam merged 2 commits into
masterfrom
fix/zig-toolchain-diagnostics
Aug 30, 2026
Merged

fix(tooling): correct Zig install guidance#51
GenericJam merged 2 commits into
masterfrom
fix/zig-toolchain-diagnostics

Conversation

@GenericJam

@GenericJam GenericJam commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • derive the required Zig version from MobDev’s root .tool-versions
  • reject mismatched or broken Zig installs before invoking Android build.zig
  • make mix mob.doctor report exact, 0.15.x, other-nightly, and failed-version-command states
  • replace unretrievable historical-nightly download guidance with exact mise commands
  • document why mob.adopt does not destructively rewrite an existing project’s toolchain file

Verification

  • mise exec zig@0.17.0-dev.269+ebff43698 -- mix test (2161 passed, 10 excluded)
  • mix format --check-formatted
  • mise exec zig@0.17.0-dev.269+ebff43698 -- mix compile --warnings-as-errors
  • mix credo --strict
  • mix erlfmt --check priv/android/crypto.erl
  • exact installed toolchain reports {:ok, "0.17.0-dev.269+ebff43698"}
  • mix mob.security_scan --strict (dependency/source scans clean; fails only on 6 pre-existing cached-runtime manifest-drift findings)
  • git diff --check

Bead: app-840

Companion generator PR: GenericJam/mob_new#41

@GenericJam

Copy link
Copy Markdown
Owner Author

Adversarially reviewed. Approve.

All live guidance sites corrected and routed through the new Toolchain module (deploy hint + doctor, with exact/0.15.x/other-nightly/broken states); every remaining '0.15' in the repo is Zigler-package history or changelog, verified by grep. Gates: 2161/2161 tests, format, credo --strict, warnings-as-errors clean. Empirical: with zig stripped from PATH the printed guidance shows the exact mise commands, and 'mise install zig@0.17.0-dev.269+ebff43698' was proven installable against a fresh MISE_DATA_DIR (notable: mise ls-remote doesn't list dev nightlies but the backend fetches them). Dropping asdf guidance is right — asdf genuinely can't retrieve historical nightlies.

One deliberate behavior change worth naming loudly (will be flagged in the release notes): zig_build_plan now hard-fails ANY non-exact zig, including previously-working legacy setups with app-owned build.zig — the exact-pin philosophy applied at preflight. This converts silent ABI-mismatch build weirdness into an actionable message with install commands. Nit for a follow-up: doctor severity reads missing→warn but mismatch→fail — a wrong zig now reads worse than no zig.

Heads-up for the queue: #44 and #43 both touch native_build.ex and its test — they'll need rebases after this. Merging.

@GenericJam
GenericJam merged commit 926d5c3 into master Aug 30, 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