fix(build): guide users when zig is missing - #2281
Conversation
build.rs now reports how to install Zig 0.15.2 (brew install zig@0.15 on macOS, ziglang.org elsewhere) and mentions the ZIG environment variable instead of panicking with a bare NotFound error.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe build script now borrows the Zig executable path when creating the command. It also reports separate diagnostics for missing Zig executables and other process-launch failures. ChangesZig build handling
Estimated code review effort: 2 (Simple) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThe PR improves the vendored libghostty-vt build failure when Zig cannot be found.
Confidence Score: 5/5The PR appears safe to merge, with no actionable defect identified in the changed build-script error handling. The new branch accurately handles the normal missing executable and invalid ZIG-path cases, while non-NotFound launch errors and nonzero Zig exit statuses retain their existing failure paths.
|
| Filename | Overview |
|---|---|
| build.rs | Adds a targeted, actionable missing-Zig diagnostic while preserving existing behavior for other launch errors and unsuccessful Zig builds. |
Reviews (1): Last reviewed commit: "fix(build): guide users when zig is miss..." | Re-trigger Greptile
|
The failing check is This is an async timeout test in the pane graphics stream — unrelated to this build.rs change (which only alters the error message emitted when the |
Problem
When
zigis not installed (or not onPATHandZIGis unset), the libghostty-vt build script panics with a bareNotFounderror that gives no hint about what to install:Fix
build.rsnow distinguishesErrorKind::NotFoundand reports:libghostty-vt,brew install zig@0.15on macOS, https://ziglang.org/download/ elsewhere),ZIGenvironment variable can point at the zig binary.Other execution errors keep the previous message with the underlying error appended.
Validation
cargo build(with a working zig 0.15.2) succeeds.cargo fmt --check,cargo clippy --all-targets --locked -- -D warnings, maintenance script tests, andcargo nextest run(3030 tests) all pass locally.Note: on this machine one plugins test initially failed due to a sandboxed home directory (
~/.config/~/.local/statenot writable); withXDG_CONFIG_HOME/XDG_STATE_HOMEpointed at a writable cache dir the full suite passes. CI onmasteris green.