Repository navigation
Show cargo progress on first build — no more silent 10min hang - #518
Conversation
First-time users see 10+ minutes of zero output during Rust compilation. Now detects first build (no release binary exists) and shows full cargo progress. Incremental rebuilds stay quiet as before. Contributes to #517.
There was a problem hiding this comment.
Pull request overview
Improves onboarding/startup UX by attempting to surface Rust cargo build output on the very first build (when compilation can take 5–15 minutes), while keeping subsequent incremental builds quiet during npm start.
Changes:
- Detects “first build” by checking for the absence of
workers/target/release/continuum-core-server. - Introduces a
CARGO_QUIETflag that togglescargo build --quietoff on first build. - Applies the
CARGO_QUIETflag consistently across the worker package builds.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # First run detection: if no release binary exists, this is a long build — show progress | ||
| CARGO_QUIET="--quiet" | ||
| if [ ! -f "target/release/continuum-core-server" ]; then | ||
| echo -e " [Rust] ${YELLOW}First build detected — this takes 5-15 minutes. Showing progress...${NC}" | ||
| CARGO_QUIET="" | ||
| fi | ||
| for pkg in archive-worker jtag-mcp; do | ||
| OUT=$(cargo build --release -p $pkg --quiet 2>&1) || { BUILD_OUTPUT+="$OUT"; RESULT=1; } | ||
| OUT=$(cargo build --release -p $pkg $CARGO_QUIET 2>&1) || { BUILD_OUTPUT+="$OUT"; RESULT=1; } | ||
| done | ||
| # continuum-core: all GPU features (metal+accelerate on macOS, cuda on Linux) | ||
| if [ -n "$GPU_FEAT" ]; then | ||
| OUT=$(cargo build --release -p continuum-core --features "$GPU_FEAT" --quiet 2>&1) || { BUILD_OUTPUT+="$OUT"; RESULT=1; } | ||
| OUT=$(cargo build --release -p continuum-core --features "$GPU_FEAT" $CARGO_QUIET 2>&1) || { BUILD_OUTPUT+="$OUT"; RESULT=1; } | ||
| else | ||
| OUT=$(cargo build --release -p continuum-core --quiet 2>&1) || { BUILD_OUTPUT+="$OUT"; RESULT=1; } | ||
| OUT=$(cargo build --release -p continuum-core $CARGO_QUIET 2>&1) || { BUILD_OUTPUT+="$OUT"; RESULT=1; } |
There was a problem hiding this comment.
The “first build detected — showing progress” branch won’t actually show live cargo progress because the build is still executed inside command substitution (OUT=$(cargo build ...)), which buffers and suppresses stdout/stderr until cargo exits. As a result, the user will still see a silent hang during the long first build. Consider running cargo directly (no capture) when CARGO_QUIET is empty, or piping through tee to both stream output and capture it for error handling (be careful to preserve the cargo exit status via PIPESTATUS).
First run: cargo output visible so users know it is working. Incremental: stays quiet. Contributes to #517 (onboarding).