Skip to content

build: drop debug info for third-party crates in dev builds - #12905

Merged
cv merged 1 commit into
v1from
ci/dependency-debuginfo
Oct 9, 2026
Merged

cv merged 1 commit into
v1from
ci/dependency-debuginfo

Conversation

@cv

@cv cv commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Failure

The repository's Actions caches total 11.3 GB against a 10 GB limit, so GitHub evicts them and Native jobs restart cold. Each platform's native-deps-v2 cache is 1.4–1.7 GB. Building the bundle in a parallel job would save 2–3 minutes on Unix and about 6 on Windows, but it needs a second cache per platform, which doesn't fit.

Decision

Set debug = false for third-party crates in the dev profile. Workspace crates keep debug = 1, so backtraces through our code keep line numbers; dependency frames keep their symbol names. Release builds and the bundle are unaffected.

Validation

Measured locally with a cold cargo build --locked --workspace --all-targets, comparing the current profile with the same build passing --config 'profile.dev.package."*".debug=false':

Current Without dependency debug info
Build time 74 s 62 s
Third-party output (deps, build scripts, fingerprints), which the cache keeps 2.31 GB 1.58 GB
All of target/debug 11.4 GB 5.2 GB

The cache is compressed, so its reduction will differ; the first v1 push records the new size. Because the change edits .cargo/config.toml, it selects a fresh cache key: this PR's runs restore an older cache and recompile dependencies, and each platform builds once more cold after merge.

cargo ci passed: 1,304 workspace tests and all 112 lifecycle tests.

@cv
cv merged commit a46f63b into v1 Oct 9, 2026
13 checks passed
@cv
cv deleted the ci/dependency-debuginfo branch October 9, 2026 11:19
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

cv added a commit that referenced this pull request Oct 10, 2026
## Failure

The Rust dependency caches have grown from 1.3–1.5 GB to about 2.9 GB
per platform in a day. Before saving, rust-cache keeps target artifacts
by crate name only, not by version or build hash
([`cleanProfileTarget`](https://github.com/Swatinem/rust-cache/blob/6323deb102c322ba6fcbdcafc7e3dddab59af2b6/src/cleanup.ts)
at the pinned revision). When a key change restores an older cache, the
new cache therefore keeps every earlier build of each crate. The two
profile changes in #12905 and #12885 each rebuilt every dependency with
new hashes.

The larger caches slow both ends of each run. Windows setup restores for
123–210 s. When `v1` saves a changed key, the Windows `Build and test`
save takes 298–433 s, and lifecycle tests wait for it. Those saves made
warm runs take 850–1,095 s instead of about 600 s.

## Decision

Add two parts to the rust-cache prefix:

- **The hash of `.cargo/config.toml`:** a profile change starts a fresh
cache instead of extending the old one.
- **The current UTC month:** this bounds the slower growth from lockfile
updates, at the cost of one cold build per platform each month.

Within a generation, manifest, lockfile, and toolchain-file changes
still restore the previous cache and rebuild only what changed. Deleting
unused artifacts before saving isn't reliable, because Cargo doesn't
touch an artifact that's already fresh, so a job can't tell which files
it used.

The new prefix also resets the current oversized caches: the first `v1`
push after merge builds each platform cold. The old entries expire
unused.

## Validation

- `actionlint` passes on the workflows, and the composite action parses
as YAML with the new step.
- `cargo ci` passed: 1,324 workspace tests and all 120 lifecycle tests.
- `fern check` passes.
- After merge, the `v1` cache entries should return to about 1.3–1.5 GB
per platform and stay there within the month.
@cv cv added the v1 NemoClaw v1 branch label Oct 12, 2026
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions chore Build, CI, dependency, or tooling maintenance labels Oct 28, 2026
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions chore Build, CI, dependency, or tooling maintenance v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants