Uh oh!
There was an error while loading. Please reload this page.
feat(bloat): default output dir + path printing; build --bloat alias - #445
Conversation
…t alias Phase 3 of #434. Three pieces of behaviour: 1. Default output dir. When neither --json nor --output-dir is given, `fbuild bloat` writes both `report.json` and `report.md` to `<project>/.fbuild/build/<env>/bloat-report/`. Project + env are pulled from the build_info.json that #428 wired up. When no build_info.json is found, falls back to `<elf-parent>/bloat-report/`. 2. Path printing on exit. Always closes with a `Bloat report:` header showing flash/ram totals, then two absolute paths verbatim — one per line — so downstream tools can `grep -E "report\.(json|md)"` to pick them up. 3. `fbuild build --bloat`. Adds a long-form alias to the existing `--symbol-analysis` field via `clap(alias = "symbol-analysis")`. The canonical user-facing spelling is now `--bloat`; the legacy spelling stays accepted (hidden alias) for back-compat through 2.3.x. Internal field name (`symbol_analysis`) is unchanged to keep churn out of fbuild-cli internals + the MCP wiring. Closes#439. 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 |
Uh oh!
There was an error while loading. Please reload this page.
Summary
Closes#439 (Phase 3 of #434). Stacked on top of #443 → #436. Merge those first.
Three pieces of behaviour:
Default output dir. When neither
--jsonnor--output-diris given,fbuild bloatwrites bothreport.jsonandreport.mdto<project>/.fbuild/build/<env>/bloat-report/. Project + env come from thebuild_info.jsonthat fbuild symbols: ingest toolchain paths from build_info.json + extend schema with nm/c++filt/readelf/objdump #428 wired up. When no build_info.json is found, falls back to<elf-parent>/bloat-report/.Path printing on exit. Always closes with a
Bloat report:header showing flash/ram totals, then two absolute paths verbatim — one per line:Downstream tools can
grep -E "report\.(json|md)"to pick the paths up.fbuild build --bloat. Adds a long-form clap alias to the existing--symbol-analysisflag — canonical name is now--bloat, legacy spelling stays accepted as hidden alias.The internal field name (
symbol_analysis) is unchanged to keep churn out of fbuild-cli internals + the MCP wiring — that's a follow-up if we want it.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— 32 passed (was 27 + 5 new)New tests:
default_output_dir_uses_project_layout— pin the.fbuild/build/<env>/bloat-report/shapedefault_output_dir_falls_back_to_elf_parent— bare-ELF fallbackresolve_returns_project_context_when_build_info_present—ToolPaths::resolvesurfaces theProjectContextbuild_bloat_flag_is_accepted—fbuild build --bloat .parsesbuild_symbol_analysis_alias_still_accepted— back-compat alias still parses🤖 Generated with Claude Code