Skip to content

fix(generator): pin Zig toolchain - #41

Merged
GenericJam merged 2 commits into
masterfrom
fix/generated-zig-pin
Aug 30, 2026
Merged

fix(generator): pin Zig toolchain#41
GenericJam merged 2 commits into
masterfrom
fix/generated-zig-pin

Conversation

@GenericJam

@GenericJam GenericJam commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • derive the required Zig version from MobNew’s root .tool-versions
  • pin the exact Zig toolchain in native and LiveView-generated projects
  • preserve Phoenix-owned dotfiles in LiveView projects, including any existing .tool-versions
  • cover fresh native output, LiveView output, and non-clobbering behavior

Verification

  • mix test (346 passed)
  • mix format --check-formatted
  • mix compile --warnings-as-errors
  • mix credo --strict
  • fresh generated output contains zig 0.17.0-dev.269+ebff43698
  • git diff --check

Bead: app-840

Companion MobDev diagnostics PR: GenericJam/mob_dev#51

@GenericJam

Copy link
Copy Markdown
Owner Author

Adversarially reviewed. Approve.

Nicely built: the pin is derived at compile time from the repo root .tool-versions (@external_resource + compile-time raise if absent) rather than hard-coded, the template comment explains the deliberate exact version, LiveView-generated projects now get a .tool-versions at all, and non-clobbering of existing files is tested. Gates: 346/346 tests, format, credo --strict, warnings-as-errors clean. Empirical: fresh generation from this branch produces the pin and 'mise exec -- zig version' resolves it. Device build not re-run — PR #40's verification yesterday already proved the Android build path with this exact pin appended manually, so pin-in-file was the only new behavior needing proof.

Two notes: (1) verified empirically that --local/MOB_NEW_DIR does NOT deliver this fix — dotfiles are compiled into the archive, not priv templates — so the 0.4.27 archive release is the only delivery path (cutting it next); (2) the generated .tool-versions header still tells asdf users 'asdf install' works, but asdf can't fetch historical zig nightlies — fixing that header line at release. Merging.

@GenericJam
GenericJam merged commit 8d3b3e1 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