Skip to content

Skip unused dev dependencies in targeted test rebuilds - #161

Open
charliermarsh wants to merge 7 commits into
codex/per-dependency-build-cache-gcfrom
charlie/codex-defer-dev-deps
Open

charliermarsh wants to merge 7 commits into
codex/per-dependency-build-cache-gcfrom
charlie/codex-defer-dev-deps

Conversation

@charliermarsh

@charliermarsh charliermarsh commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

With Ohm defaults, cargo +ohm test -p app --lib selected can skip unused workspace dev dependencies on rebuilds. This can also avoid compiling the ordinary library needed only by an unused test helper. Features, compiler arguments, and optimization settings stay the same.

We use the previous executable's unused-dependency report to choose what to skip. The new compilation must confirm those dependencies are still unused before we accept the executable. Otherwise, we discard the output and retry once with all dependencies. Crashes and interruptions stop the command.

Native dependencies still build normally. We check their current outputs after build scripts finish. Unsupported native inputs retain the full build.

Skipped dependencies' errors and warnings are not reported. Use -Zohm-defer-dev-deps=no when you need to validate all declared dependencies. A failed attempt can cost an extra compilation.

One uncontended off/on pair per workload, with optimized Cargo, LLD, and the same warm checkpoint and settings within each pair:

Targeted test rebuild Off On Saved
ty 72.22s 37.72s 34.50s
uv 30.97s 26.22s 4.76s

These are single-pair results. In uv, the skipped helper accounted for 2.65s; the main compiler's additional 1.49s improvement needs more samples to establish.

Seven focused regressions cover stale archives, unsafe native inputs, changed dependency usage, and failed attempts. Linux and macOS CI pass.

@charliermarsh
charliermarsh added this pull request to stack #155 October 16, 2026 23:50
@charliermarsh
charliermarsh removed this pull request from stack #155 October 17, 2026 00:08
@charliermarsh
charliermarsh force-pushed the charlie/codex-defer-dev-deps branch from 19cc62b to c1d5e8b Compare October 17, 2026 00:09
@charliermarsh
charliermarsh changed the base branch from codex/per-dependency-build-cache-gc to charlie/fix-clippy-dependency-reuse October 17, 2026 00:09
@charliermarsh
charliermarsh added this pull request to stack #162 October 17, 2026 00:09
@charliermarsh
charliermarsh removed this pull request from stack #162 October 17, 2026 00:10
@charliermarsh
charliermarsh force-pushed the charlie/codex-defer-dev-deps branch 2 times, most recently from 19cc62b to dd33194 Compare October 17, 2026 00:12
@charliermarsh
charliermarsh changed the base branch from charlie/fix-clippy-dependency-reuse to codex/per-dependency-build-cache-gc October 17, 2026 00:12
@charliermarsh
charliermarsh added this pull request to stack #163 October 17, 2026 00:12
@charliermarsh
charliermarsh force-pushed the charlie/codex-defer-dev-deps branch from dd33194 to b7ae267 Compare October 17, 2026 00:26
@charliermarsh
charliermarsh removed this pull request from stack #163 October 17, 2026 12:54
@charliermarsh
charliermarsh added this pull request to stack #166 October 17, 2026 12:54
charliermarsh added a commit to astral-experiments/ohm that referenced this pull request Oct 17, 2026
Update the Cargo pin in the unpublished Ohm 1.99.0-5 manifest to include the retained-native-archive support in astral-experiments/ohm-cargo#161 and the rebased ThinLTO cleanup change in astral-experiments/ohm-cargo#164. Align the compiler's Cargo gitlink with the manifest.

The source revisions, manifest history, and formatting checks pass.
@charliermarsh charliermarsh changed the title Defer unused dev dependencies in targeted test rebuilds by default Skip unused dev dependencies in targeted test rebuilds Oct 17, 2026
@charliermarsh
charliermarsh removed this pull request from stack #166 October 23, 2026 16:31
@charliermarsh
charliermarsh added this pull request to stack #227 October 23, 2026 16:32
@charliermarsh
charliermarsh removed this pull request from stack #227 October 25, 2026 13:06
@charliermarsh
charliermarsh added this pull request to stack #241 October 25, 2026 13:06
@charliermarsh
charliermarsh removed this pull request from stack #241 October 27, 2026 02:57
@charliermarsh
charliermarsh added this pull request to stack #252 October 27, 2026 02:57
@charliermarsh
charliermarsh removed this pull request from stack #252 October 27, 2026 15:06
@charliermarsh
charliermarsh added this pull request to stack #255 October 27, 2026 15:06
@charliermarsh
charliermarsh removed this pull request from stack #255 October 27, 2026 21:36
@charliermarsh
charliermarsh added this pull request to stack #257 October 27, 2026 21:36
@charliermarsh
charliermarsh removed this pull request from stack #257 October 28, 2026 00:23
@charliermarsh
charliermarsh added this pull request to stack #259 October 28, 2026 00:23
@charliermarsh
charliermarsh removed this pull request from stack #259 October 28, 2026 17:21
@charliermarsh
charliermarsh added this pull request to stack #272 October 28, 2026 17:21
@charliermarsh
charliermarsh removed this pull request from stack #272 October 28, 2026 17:42
@charliermarsh
charliermarsh added this pull request to stack #273 October 28, 2026 17:42
@charliermarsh
charliermarsh removed this pull request from stack #273 October 29, 2026 04:52
@charliermarsh
charliermarsh added this pull request to stack #278 October 29, 2026 04:53
@charliermarsh
charliermarsh removed this pull request from stack #278 October 29, 2026 14:06
@charliermarsh
charliermarsh added this pull request to stack #290 October 29, 2026 14:06
@charliermarsh
charliermarsh removed this pull request from stack #290 October 30, 2026 02:25
@charliermarsh
charliermarsh added this pull request to stack #295 October 30, 2026 02:25
@charliermarsh
charliermarsh removed this pull request from stack #295 October 31, 2026 13:06
@charliermarsh
charliermarsh added this pull request to stack #329 October 31, 2026 13:07
@charliermarsh
charliermarsh removed this pull request from stack #329 October 31, 2026 18:02
@charliermarsh
charliermarsh added this pull request to stack #331 October 31, 2026 18:02
@charliermarsh
charliermarsh removed this pull request from stack #331 November 1, 2026 01:58
@charliermarsh
charliermarsh added this pull request to stack #364 November 1, 2026 01:58
@charliermarsh
charliermarsh removed this pull request from stack #364 November 1, 2026 11:41
@charliermarsh
charliermarsh added this pull request to stack #383 November 1, 2026 11:41
@charliermarsh
charliermarsh removed this pull request from stack #383 November 1, 2026 18:29
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