fix(build): guide users when zig is missing - #2281
Conversation
|
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)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe build script now borrows the Zig executable path when creating the command. It reports separate diagnostics for missing Zig executables and other process-launch failures. ChangesZig build handling
Estimated code review effort: 2 (Simple) | ~5 minutes Merge Risk: ⚪ Minimal · up to This localized build-message change guides users to install Zig or configure the ZIG path without changing successful build behavior; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThe PR improves build-time guidance when the Zig process cannot be launched while preserving the existing error reporting for other process-launch failures.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| build.rs | Improves diagnostics around launching Zig for the vendored libghostty-vt build; no follow-up-eligible issue was identified. |
Reviews (2): 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 |
|
@LosEcher the implementation review is clean. please rebase onto current master and rerun checks and both review bots. |
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.
42dfae8 to
02bdf37
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
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.