Skip to content

Show cargo progress on first build — no more silent 10min hang - #518

Merged
joelteply merged 1 commit into
mainfrom
fix/first-run-build-progress
Mar 26, 2026
Merged

joelteply merged 1 commit into
mainfrom
fix/first-run-build-progress

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

First run: cargo output visible so users know it is working. Incremental: stays quiet. Contributes to #517 (onboarding).

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.
Copilot AI review requested due to automatic review settings March 26, 2026 14:56
@joelteply
joelteply merged commit 26a44aa into main Mar 26, 2026
@joelteply
joelteply deleted the fix/first-run-build-progress branch March 26, 2026 14:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_QUIET flag that toggles cargo build --quiet off on first build.
  • Applies the CARGO_QUIET flag consistently across the worker package builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +133 to +146
# 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; }

Copilot AI Mar 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants