Skip to content

build: drop full debug info from default profiles - #581

Merged
shinaoka merged 1 commit into
mainfrom
build-profile-hygiene
Aug 8, 2026
Merged

build: drop full debug info from default profiles#581
shinaoka merged 1 commit into
mainfrom
build-profile-hygiene

Conversation

@shinaoka

@shinaoka shinaoka commented Aug 8, 2026

Copy link
Copy Markdown
Member

Summary

Local target/ measured 14 GB (release 12 GB, debug 2.7 GB) because [profile.release] debug = true combines with the repository policy of running normal verification in release mode, so every test binary and dependency rlib carries full debug info. Among the 12 GB were 7 orphaned feature/rev variants of libtenferro_cpu alone (596 MB).

Changes to the workspace Cargo.toml:

  • [profile.release] debug = "line-tables-only": keeps readable RUST_BACKTRACE file:line output (the stated reason for the previous debug = true) at a fraction of the size.
  • New [profile.release-debug] inheriting release with debug = true, for sessions that attach a debugger: cargo build --profile release-debug.
  • [profile.dev] / [profile.test] pin debug = 0 while keeping debug-assertions and overflow-checks, matching tenferro-rs practice. One-command override: CARGO_PROFILE_DEV_DEBUG=2.

Follows the shared build-artifact hygiene rule proposed in tensor4all/tensor4all-agent-rules#9. Stale-artifact pruning and CI-profile work (strip, release overflow-checks) are tracked in #566 and not part of this change.

Verification

  • cargo tree --workspace and cargo metadata parse the new profiles (profile schema is validated at manifest load).
  • Build-config only; no source changes. CI exercises the full matrix on the new settings.

Note: first build after merge is a full rebuild (profile flags change); reclaiming existing bloat needs a one-time cargo clean --release.

🤖 Generated with Claude Code

Local target/ reached 14 GB, 12 GB of it release artifacts, because
[profile.release] carried debug = true while repository policy runs the
normal verification suite in release mode. Release now uses
line-tables-only, which keeps file:line RUST_BACKTRACE output; a new
release-debug profile inherits release with full debug info for debugger
sessions. dev/test pin debug = 0 while keeping debug assertions and
overflow checks, matching the shared build-artifact hygiene rule
(tensor4all/tensor4all-agent-rules#9) and tenferro-rs practice.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@shinaoka
shinaoka enabled auto-merge (squash) August 8, 2026 17:14
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

Repository rules review

Repository rules review (ae655a9ec08a0c3df8c25369b84be0d04e2a2bf3...9206d9ff7b4137535256862fab4050d77f2c0431)
Verdict: pass
LLM review: 1 chunk(s) (945 chars) in 5.1s; 0 finding(s) returned, 0 kept, 0 dropped by diff-anchor filtering.
No findings.

@shinaoka
shinaoka merged commit bf6ee40 into main Aug 8, 2026
11 checks passed
@shinaoka
shinaoka deleted the build-profile-hygiene branch August 8, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant