Skip to content

Require exactly Zig 0.15.2 to build the native module#541

Merged
dakra merged 1 commit into
mainfrom
zig-version-guard
Jul 14, 2026
Merged

Require exactly Zig 0.15.2 to build the native module#541
dakra merged 1 commit into
mainfrom
zig-version-guard

Conversation

@dakra

@dakra dakra commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Several users hit opaque Zig compiler errors when building the native module with a Zig version other than 0.15.2. Nothing enforced or clearly stated the exact-version requirement.

  • build.zig.zon: add minimum_zig_version = "0.15.2" so older Zig gets a clean official error before the build script even compiles.
  • build.zig: add a file-scope comptime guard that fails any other version (including newer Zig) with ghostel requires exactly Zig 0.15.2, found <version>. The message also surfaces in M-x ghostel-module-compile's *compilation* buffer and the auto-install *ghostel-build* log, since both just run zig build.
  • README.org: state the exact version requirement in the requirements section and at the top of Building from source.
  • ghostel.el: fix the commentary that said "Zig 0.15.2+".

Verified: make -j8 all passes with Zig 0.15.2; pinning the guard to 0.15.3 reproduces the mismatch and shows the error in both the *compilation* buffer and the auto-install warning path in a live Emacs session.

A minimum_zig_version in build.zig.zon rejects older Zig before the
build script compiles, and a comptime guard in build.zig rejects any
version other than 0.15.2 with an explicit error, which also surfaces
in ghostel-module-compile's compilation buffer and the auto-install
build log.  State the exact version requirement in the README.
@dakra dakra merged commit cdd8dc5 into main Jul 14, 2026
28 checks passed
@dakra dakra deleted the zig-version-guard branch July 14, 2026 08:05
@dakra dakra temporarily deployed to github-pages July 14, 2026 08:05 — with GitHub Actions Inactive
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