feat(cli): #242 fbuild ci — PlatformIO-compatible alias for compile-many#248
Conversation
…many Adds `fbuild ci` as a drop-in replacement for `pio ci`. The new subcommand delegates to the two-stage `compile-many` primitive (#241) and exposes the PIO-compatible flag surface so existing CI workflows can swap `s/pio ci/fbuild ci/` without other changes. Flag mapping: - --board / -b -> required, matches pio ci - --lib / -l (repeatable) -> PLATFORMIO_LIB_EXTRA_DIRS (';' on Windows, ':' elsewhere) - --project-conf / -c -> PLATFORMIO_PROJECT_CONFIG (canonicalized when possible) - --keep-build-dir -> accepted for compat (no-op; fbuild always keeps build dirs) - --build-dir <path> -> accepted for compat (warns; not yet honored) - positional sketches -> .ino files are rewritten to their parent dir CompileManyRequest gains a `pio_env: HashMap<String,String>` overlay that threads through every per-sketch BuildParams, so --lib / --project-conf reach the platform orchestrators via the existing PLATFORMIO_* contract. Also fixes a Windows-debug stack overflow in clap's --help rendering: the extra subcommand pushes past the OS main thread's 1 MB default, so main() now trampolines through an 8 MB std::thread for clap's parse path. Closes #242. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ 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 |
Summary
Adds
fbuild cias a drop-in replacement forpio ci. The new subcommand delegates to the two-stagecompile-manyprimitive (#241) and exposes the PlatformIO-compatible flag surface so existing CI workflows can swaps/pio ci/fbuild ci/without other changes.Flag mapping
fbuild ciflagpio ciequivalent--board <b>/-b <b>--board/-buno,teensy41).--lib <path>/-l <path>(repeatable)--lib/-lPLATFORMIO_LIB_EXTRA_DIRS; joined with;on Windows,:elsewhere.--project-conf <path>/-c <path>--project-conf/-cPLATFORMIO_PROJECT_CONFIG. Canonicalized when possible, otherwise passed through as-given.--keep-build-dir--keep-build-dir.fbuild/build/...).--build-dir <path>--build-dir--framework-jobs/--sketch-jobs/--quick/--release/-vcompile-many..inofiles are rewritten to their parent dir; project dirs pass through unchanged.How it threads through
CompileManyRequestgains apio_env: HashMap<String, String>overlay that propagates into every per-sketchBuildParams.pio_env, so--lib/--project-confreach the platform orchestrators via the existingPLATFORMIO_*env-var contract thatfbuild-configalready handles.Both
fbuild ciandfbuild compile-manyremain exposed and share the underlying handler.Stack-overflow fix
The new
Cienum variant pushes clap's--helpformatting past Windows' 1 MB default main-thread stack on debug builds (would crash withSTATUS_STACK_OVERFLOWbeforeparse_fromreturns).main()now trampolines through an 8 MBstd::thread, restoring--helpon debug Windows and not regressing release builds.Test plan
uv run soldr cargo check --workspace --all-targetspassesuv run soldr cargo clippy --workspace --all-targets -- -D warningspassesuv run soldr cargo fmt --all -- --checkcleanuv run soldr cargo test -p fbuild-cli— 11 new inlineci_tests(path normalization, env-var building, clap round-trip, short flag, required-arg + mutual-exclusion rejection) plus 3 spawn-the-binary integration tests (ci_help_lists_pio_compat_flags,ci_without_board_is_a_usage_error,ci_without_sketches_is_a_usage_error) all passuv run soldr cargo test -p fbuild-build --test compile_many_two_stagestill greenfbuild ci --helprenders on debug + release Windows buildsunoto confirm--lib/--project-confplumbing — covered by follow-up consumer in ci: switch ./compile to fbuild compile-many for faster example builds on CI FastLED#2470Closes #242.