Uh oh!
There was an error while loading. Please reload this page.
feat(build): default-on post-link bloat report - #447
Conversation
…-out Phase 5 of #434. `fbuild build` now runs the fine-grained bloat analyzer automatically after a successful link and writes both `report.json` and `report.md` to `<project>/.fbuild/build/<env>/bloat-report/`. Pass `--no-bloat-report` to skip — useful in CI matrices where the extra artifacts would blow up download size. An explicit `--bloat <path>` (the legacy daemon-side `--symbol-analysis` flag, post-#439) continues to be respected and short-circuits this default so we don't double up the analyzer. Implementation: CLI-side hook in `run_build` that calls `bloat_cmd::run_bloat` after the daemon returns success. Failures in the post-build analyzer are non-fatal — the build itself already succeeded; we don't want a missing nm to fail a green build. Reuses the full toolchain auto-resolution from #428 + #438 + #439, so zero extra wiring per platform. Closes#441. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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
Closes#441 (Phase 5 of #434). Stacked on top of #446 → #445 → #443 → #436. Merge those first.
fbuild buildnow runs the fine-grained bloat analyzer automatically after a successful link and writes bothreport.jsonandreport.mdto<project>/.fbuild/build/<env>/bloat-report/. Pass--no-bloat-reportto skip — useful in CI matrices where the extra artifacts would blow up download size.Behaviour
fbuild build .→ emitsbloat-report/{report.json,report.md}+ the bloat summary on stdout.fbuild build --no-bloat-report .→ skips the post-link analyzer.fbuild build --bloat <path> .→ respects the explicit path (legacy daemon-side spelling, fbuild bloat: default output dir under build tree + path printing on exit (Phase 3 of #434) #439); does not double-up.fbuild build -t compiledb .→ no ELF produced, no bloat report.Implementation
CLI-side hook in
run_build: after the daemon returns success, callbloat_cmd::run_bloatagainst the project dir with all-defaults. Reuses the full toolchain auto-resolution from #428 + #438 + #439, so zero extra wiring per platform.Test plan
soldr cargo check -p fbuild-cli --all-targets✅soldr cargo clippy -p fbuild-cli --all-targets -- -D warnings✅soldr cargo test -p fbuild-cli --bin fbuild— 43 passed (was 41 + 2 new)New tests:
build_no_bloat_report_defaults_to_false— flag defaults match the documented behaviourbuild_no_bloat_report_flag_is_accepted— opt-out parses🤖 Generated with Claude Code