Repository navigation
Conversation
Allow skipping the Zig builds of cmuxd and ghostty CLI helper during reload by setting CMUX_SKIP_ZIG_BUILD=1. This speeds up the edit-build-test cycle when iterating on Swift/Xcode changes that don't touch the Zig-built binaries. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
@ueg1990 is attempting to deploy a commit to the Manaflow Team on Vercel. A member of the Team first needs to authorize it. |
Greptile SummaryThis PR adds a Confidence Score: 5/5Safe to merge; all findings are minor P2 style/UX suggestions that don't affect correctness. The change is small and isolated to a developer script. The logic is correct — the guard condition No files require special attention.
|
| Filename | Overview |
|---|---|
| scripts/reload.sh | Adds CMUX_SKIP_ZIG_BUILD guard around Zig build steps; flag not documented in usage() and no warning emitted when binaries are missing while the flag is active. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[reload.sh invoked] --> B{CMUX_SKIP_ZIG_BUILD == 1?}
B -- No --> C[zig build cmuxd]
C --> D[zig build ghostty cli-helper]
D --> E{cmuxd binary exists?}
B -- Yes --> E
E -- Yes --> F[cp cmuxd → app bundle]
E -- No --> G[skip cmuxd copy]
F --> H{ghostty helper exists?}
G --> H
H -- Yes --> I[cp ghostty → app bundle]
H -- No --> J[skip ghostty copy]
I --> K[xcodebuild]
J --> K
Comments Outside Diff (2)
-
scripts/reload.sh, line 103-117 (link)CMUX_SKIP_ZIG_BUILDmissing from usage textThe new env-var flag isn't mentioned in the
usage()function, so anyone running--helpwon't discover it. Adding a line there would make it self-documenting alongside the other options. -
scripts/reload.sh, line 421-440 (link)Silent no-op when binaries haven't been built yet
When
CMUX_SKIP_ZIG_BUILD=1is set and neithercmuxd/zig-out/bin/cmuxdnorghostty/zig-out/bin/ghosttyexist yet (e.g. first run after a clean checkout), the copy guards on lines 429 and 435 silently skip both binaries. The app will build and launch but be missingcmuxdand the Ghostty helper with no warning. A quick existence check after the guarded build would surface this early.
Reviews (1): Last reviewed commit: "Add CMUX_SKIP_ZIG_BUILD flag to reload.s..." | Re-trigger Greptile
There was a problem hiding this comment.
🧹 Nitpick comments (1)
scripts/reload.sh (1)
421-428: LGTM — conditional gate correctly implemented.The logic properly skips Zig builds when
CMUX_SKIP_ZIG_BUILD=1, and the${CMUX_SKIP_ZIG_BUILD:-}default handles the unset-variable case. The-Doptimize=ReleaseFastflags are retained per project conventions.Consider adding a brief echo when skipping (similar to
build-ghostty-cli-helper.sh) so developers have visibility:💡 Optional: Add feedback when skipping Zig builds
if [[ "${CMUX_SKIP_ZIG_BUILD:-}" != "1" ]]; then if [[ -d "$PWD/cmuxd" ]]; then (cd "$PWD/cmuxd" && zig build -Doptimize=ReleaseFast) fi if [[ -d "$PWD/ghostty" ]]; then (cd "$PWD/ghostty" && zig build cli-helper -Dapp-runtime=none -Demit-macos-app=false -Demit-xcframework=false -Doptimize=ReleaseFast) fi +else + echo "Skipping Zig builds (CMUX_SKIP_ZIG_BUILD=1)" fiBased on learnings: "When rebuilding cmuxd for release/bundling, always use ReleaseFast optimization" — the code correctly uses
-Doptimize=ReleaseFast.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/reload.sh` around lines 421 - 428, Add a short echo when Zig builds are skipped so developers see why builds were omitted: inside the existing conditional that checks CMUX_SKIP_ZIG_BUILD (the block containing the cmuxd and ghostty checks and the zig build invocations), add an echo statement executed when CMUX_SKIP_ZIG_BUILD is "1" (or when the conditional branch that would skip the builds is taken) that prints a concise message like "Skipping Zig builds (CMUX_SKIP_ZIG_BUILD=1)". Reference the existing symbols CMUX_SKIP_ZIG_BUILD, cmuxd, ghostty, and the zig build commands to locate the code to modify; ensure the echo is only printed when skipping and does not change the current build behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@scripts/reload.sh`:
- Around line 421-428: Add a short echo when Zig builds are skipped so
developers see why builds were omitted: inside the existing conditional that
checks CMUX_SKIP_ZIG_BUILD (the block containing the cmuxd and ghostty checks
and the zig build invocations), add an echo statement executed when
CMUX_SKIP_ZIG_BUILD is "1" (or when the conditional branch that would skip the
builds is taken) that prints a concise message like "Skipping Zig builds
(CMUX_SKIP_ZIG_BUILD=1)". Reference the existing symbols CMUX_SKIP_ZIG_BUILD,
cmuxd, ghostty, and the zig build commands to locate the code to modify; ensure
the echo is only printed when skipping and does not change the current build
behavior.
Merges the main branch approach (echo message, ghostty-only skip) with our branch's approach (skip both cmuxd and ghostty). The resolved version wraps both zig builds in the skip guard and adds an informational echo. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
This is shipped on current main in |
Summary
CMUX_SKIP_ZIG_BUILD=1environment variable to skip the Zig builds ofcmuxdandghosttyCLI helper inreload.shCMUX_SKIP_ZIG_BUILD=1 ./scripts/reload.sh --tag my-featureContext
Zig 0.15.2 does not yet support the macOS 26 (Tahoe) SDK (macOS SDK 26.4 / Xcode 26.4). Zig build steps fail when the system
xcrunresolves to the macOS 26 SDK, which is the default on machines running the macOS 26 beta. Until Zig ships a release with macOS 26 SDK support, developers on macOS 26 need a way to skip the Zig build steps inreload.shand rely on pre-built binaries.macosx26.4)Test plan
./scripts/reload.sh --tag testwithout the env var — Zig builds should execute as beforeCMUX_SKIP_ZIG_BUILD=1 ./scripts/reload.sh --tag test— Zig builds should be skipped, existing binaries used.applaunches correctly in both cases🤖 Generated with Claude Code
Summary by CodeRabbit