Skip to content

vendor(zccache): submodule at _vender/zccache + path-dep wiring (soldr#940)#986

Merged
zackees merged 4 commits into
mainfrom
vendor/zccache-submodule-940
Jun 27, 2026
Merged

vendor(zccache): submodule at _vender/zccache + path-dep wiring (soldr#940)#986
zackees merged 4 commits into
mainfrom
vendor/zccache-submodule-940

Conversation

@zackees

@zackees zackees commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Brings the zccache codebase back into the soldr tree as a git submodule at _vender/zccache (branch feat/inner-compile-tracing-940, pinned at zccache commit 866d29d).
  • crates/soldr-cli/Cargo.toml flips zccache from git + rev to path = "../../_vender/zccache/crates/zccache".
  • 28 actions/checkout steps across 23 workflows now declare submodules: recursive so CI fetches zccache alongside soldr.
  • Per-field compat updates in zccache_embedded.rs for the two new fields that landed upstream since the prior pin: RuntimeHooks::handle (zccache#922) and ZccacheConfig::cancellation (zccache#923). Both default to None — preserves prior behavior exactly.

Why

The flat-vendor in soldr#984 was retired after the buffer-elimination plan (#939) failed. With the diagnostic now pointing at the embedded compile pipeline (soldr#985 → 99.7% of cold dispatch sits inside ZccacheService::compile), iteration on zccache's internals is the actual work to do. A submodule reference:

  • Smaller commit footprint in soldr (single 40-byte pointer vs the 196K-line copy the flat vendor produced).
  • Same fast iteration — edit code under _vender/zccache, soldr's path-dep picks it up immediately on the next build.
  • Upstream-PR-from-submodule flow is unchanged (cd into the submodule, push, then bump the submodule pointer in a soldr commit).

The submodule branch tracks feat/inner-compile-tracing-940 until upstream zccache#941 merges, then flips to main.

Iteration workflow

cd _vender/zccache
# edit zccache code, then
git commit -m "feat: ..."
git push                              # to feat/inner-compile-tracing-940
cd ../..
git add _vender/zccache               # bumps submodule pointer
git commit -m "vendor: bump zccache to <sha>"
soldr cargo build -p soldr-cli         # picks up new code via path-dep

Test plan

  • soldr cargo build -p soldr-cli --bin soldr --bin soldr-daemon builds clean (33s warm)
  • All 23 workflow YAML files validate
  • CI fetches the submodule + builds across the matrix

Related

  • zccache#941 — open PR on the submodule branch (per-sub-phase tracing)
  • soldr#981 — cold-build regression this re-enables iteration toward
  • soldr#984 — the prior flat-vendor retirement

🤖 Generated with Claude Code

zackees and others added 4 commits June 26, 2026 19:33
…r#940)

Brings the zccache codebase back into the soldr repo as a git submodule
(branch `feat/inner-compile-tracing-940`) so the inner compile path can
be iterated in-tree. The previous flat-vendor approach (retired in
soldr#984 after the failed buffer-elimination plan) is replaced by a
submodule reference: smaller commit footprint in soldr, fast iteration
via path-dep, upstream-PR-from-submodule workflow stays the same.

Files:
* `.gitmodules` + `_vender/zccache` — submodule entry pinned at
  zccache commit 866d29d (the open zccache#941 PR).
* `Cargo.toml` — adds `_vender/zccache` to workspace `exclude` so
  cargo doesn't try to fold zccache's crates into soldr's workspace
  (zccache has its own `[workspace]` + `[workspace.dependencies]`).
* `crates/soldr-cli/Cargo.toml` — zccache dep flips from `git +
  rev = "fde4b916..."` to `path = "../../_vender/zccache/crates/zccache"`.
* `crates/soldr-cli/src/zccache_embedded.rs` — adds the two new
  fields the submodule HEAD exposes vs the prior git-rev pin:
  `RuntimeHooks::handle: None` (zccache#922) and
  `ZccacheConfig::cancellation: None` (zccache#923). Both default-
  preserving — None matches the old implicit behavior.
* `.github/workflows/*.yml` — every `actions/checkout` step now
  declares `submodules: recursive` so CI pulls the zccache source
  alongside soldr. 28 sites in 23 workflows. No-op for jobs that
  don't build soldr (idempotent extra fetch).

The diagnostic trace site shipped in soldr#985 (the merged daemon-side
JSONL tracer) and the matching upstream zccache#941 trace site
(merging shortly) now both live in this tree's checkout.

## Iteration workflow

```
cd _vender/zccache
# edit zccache code
git commit -m "..." && git push   # to feat/inner-compile-tracing-940
cd ../..
git add _vender/zccache             # bumps submodule pointer
git commit -m "vendor: bump zccache to <sha>"
soldr cargo build -p soldr-cli       # picks up the new code immediately
```

When the upstream zccache#941 lands on zccache main, this branch
flips the submodule's tracked branch to `main` and the pointer to
the corresponding merged commit.

## Test plan

- [x] `soldr cargo build -p soldr-cli --bin soldr --bin soldr-daemon` builds clean (33s on warm cache, picks up zccache from submodule path)
- [x] All 23 workflow YAML files validate via `yaml.safe_load`

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…pointer

* Adds `vendor_is_git_submodule()` helper that detects when
  `_vender/zccache` is a registered git submodule (via `.gitmodules`).
  When detected, Check 1 passes without requiring a `.vendor-state`
  file, and Checks 2+3 (deadline + delta-PR grace) are skipped.
  Rationale: submodule mode tracks the external repo by commit
  pointer with no in-tree code copy, so flat-vendor's deadline +
  delta-tracking discipline does not apply — bumping is a single
  `git add` of the pointer, not a code merge with drift risk.

* Bumps `_vender/zccache` submodule pointer to e8a64ce, picking up
  the rustfmt fix that just landed on the open zccache#941 branch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The submodule pin (zccache#926 strict-validation) now rejects
`AuditConfig` with `mode > Off` and `output_root = None` at service
startup with: "audit sink requires output_root when mode > Off". The
default ships `mode = AuditMode::Normal` + `output_root = None`,
which is exactly the rejected combo.

soldr does not consume zccache audit events today — the per-compile
trace site (soldr#985 / zccache#940) lives outside the AuditSink and
writes its own JSONL. Set `mode = AuditMode::Off` explicitly so the
embedded service starts cleanly. If we ever want zccache audit emission
on the soldr side, this is the file that sets `output_root` too.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
zccache#941 (per-sub-phase compile trace) merged at zccache commit
8493a9c. Flips the submodule's tracked branch from the now-defunct
`feat/inner-compile-tracing-940` to `main` so future `git submodule
update --remote` calls pick up upstream main directly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zackees zackees merged commit 2f14453 into main Jun 27, 2026
20 of 27 checks passed
@zackees zackees deleted the vendor/zccache-submodule-940 branch June 27, 2026 03:00
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