fix(cli): avoid duplicate objc dylib on macOS - #1027
Conversation
Replace ctrlc with Tokio's cross-platform signal handler so macOS release binaries do not pull objc2 through dispatch2.\n\nCloses #1024.
📝 WalkthroughWalkthroughThe CLI replaces the ChangesCtrl+C handling
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/fbuild-cli/src/cli/dispatch.rs`:
- Around line 55-60: Update the Ctrl+C handler task around
tokio::signal::ctrl_c() to explicitly handle both Result outcomes: retain the
existing interruption warning and exit code 130 on success, and log the setup
error with output::warn or the established diagnostic mechanism before exiting
or propagating the failure when setup fails.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 677ecf9e-c07c-4bbc-bc02-c98ddb1d63fa
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (2)
crates/fbuild-cli/Cargo.tomlcrates/fbuild-cli/src/cli/dispatch.rs
💤 Files with no reviewable changes (1)
- crates/fbuild-cli/Cargo.toml
| tokio::spawn(async { | ||
| if tokio::signal::ctrl_c().await.is_ok() { | ||
| output::warn("Interrupted"); | ||
| std::process::exit(130); | ||
| } | ||
| }); |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
soldr cargo tree --offline -p fbuild-cli -e features | rg 'tokio|signal'Repository: FastLED/fbuild
Length of output: 191
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
git ls-files 'crates/fbuild-cli/src/cli/dispatch.rs' 'crates/fbuild-cli/Cargo.toml'
echo '--- dispatch.rs ---'
sed -n '1,140p' crates/fbuild-cli/src/cli/dispatch.rs
echo '--- Cargo.toml ---'
sed -n '1,220p' crates/fbuild-cli/Cargo.tomlRepository: FastLED/fbuild
Length of output: 6495
Handle Ctrl+C setup errors instead of ignoring them.
tokio::signal::ctrl_c().await returns a Result; is_ok() drops the error path, so if the signal handler cannot be installed the CLI keeps running without Ctrl+C handling or diagnostics. Log the error and exit (or propagate it) instead.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@crates/fbuild-cli/src/cli/dispatch.rs` around lines 55 - 60, Update the
Ctrl+C handler task around tokio::signal::ctrl_c() to explicitly handle both
Result outcomes: retain the existing interruption warning and exit code 130 on
success, and log the setup error with output::warn or the established diagnostic
mechanism before exiting or propagating the failure when setup fails.
|
CI is currently blocked before compilation: every hosted job fails in setup-soldr because zackees/setup-soldr requests the nonexistent zackees/soldr v0.8.9 release (HTTP 404). Local validation passed: soldr cargo check/clippy/format for fbuild-cli. Proceeding with admin merge due shared CI infrastructure failure. |
Closes #1024.
Summary
ctrlcdependency with Tokio's cross-platformctrl_csignal driverctrlc -> dispatch2 -> objc2dependency chain and its explicit Objective-C runtime linkValidation
soldr cargo check -p fbuild-cli --offlinesoldr cargo clippy -p fbuild-cli --all-targets --offline -- -D warningssoldr cargo fmt --all -- --checksoldr cargo tree --target aarch64-apple-darwin -p fbuild-clino longer containsctrlc,dispatch2, orobjc2The local Windows host cannot perform the final Apple link because its cross-build environment lacks
cc; the release macOS lanes provide the authoritative Mach-O validation.Summary by CodeRabbit