Repository navigation
Description
Context
In PR #253 (chore(deps): adopt upstream soldr/zccache/setup-soldr updates) we added prebuild-deps: none to every zackees/setup-soldr@v0 invocation across 11 workflow blocks. setup-soldr's default since their PR #140 is prebuild-deps: cargo-chef — it runs soldr cook to pre-warm target/deps/ with all transitive dependency artifacts on the cache-keyed Cargo.lock hash. When the cache hits, the user's first cargo build starts hot.
For fbuild we had to disable it because the cook step pre-populates target/ and the subsequent soldr cargo build -p fbuild-cli -p fbuild-daemon fails:
##[warning]setup-soldr detected a pre-populated shared target directory;
a subsequent `soldr cargo build` using the same `--target-dir` may fail
with a missing .rmeta error - see README 'Known limitations'.
...
error: could not compile `fbuild-cli` (bin "fbuild")
Documented upstream as a known shared-target-dir limitation when you cook → cargo build -p <subset>.
Why this matters
fbuild's CI is heavy. Every PR runs the full board matrix (80+ jobs), and each one compiles fbuild's entire dependency tree from cold (zccache helps but only for downstream compilations, not for the dep tree itself). The cook layer's cache-key (cook-${os}-${arch}-${libc}-rustc${release}-f${flagsHash}-l${lockHash}-soldr${ver}) is content-addressable on Cargo.lock — it would hit across branches automatically and turn "cold first build" into "warm-start build" for every CI run.
Per setup-soldr's design doc (PR #140), the win is measured in tens of seconds per job on cache hit. Across 80+ jobs that's potentially 30+ minutes of CI savings per PR.
Options to enable
-
Separate target dir for the cook step. Cook writes to
target-chef/; the user's build still usestarget/. Loses the warm-start benefit but plays nice with-p <subset>builds. Probably not what we want. -
Build the full workspace instead of
-p fbuild-cli -p fbuild-daemon. Cook prebuilds the whole transitive dep graph; if we then build the whole workspace, every.rmetacook created is what cargo expects to see. Trade-off: workspace builds compile more code than the subset we need for distribution. -
Tune
prebuild-deps-flagsto constrain chef's prebuild to the same-psubset (prebuild-deps-flags: \"-p fbuild-cli -p fbuild-daemon\"). Aligns cook's output with the actual build. Smallest change, but requires verifying chef respects-pfor the prebuild phase. -
Wait for upstream setup-soldr fix. Likely lowest-effort if it lands.
Option 3 is probably the right first try.
Acceptance criteria
- Pick a per-workflow strategy (likely Fix ESP32-S3 PSRAM board configuration in board JSON database #3, with cdc on boot warning #2 as fallback for
template_native_build.ymlwhich already builds-p fbuild-cli -p fbuild-daemon). - Remove
prebuild-deps: nonefrom one workflow as a probe (suggestcheck-ubuntu.yml); verify clean run. - Measure the time saved on a cache hit vs current cold-deps baseline. Threshold to roll out: ≥ 30s wall-clock per job on a hit.
- If clean, drop
prebuild-deps: noneworkflow-by-workflow. - If the upstream issue gets fixed first, ride that fix instead of working around it locally.
Reference
- Original disable: PR chore(deps): adopt upstream soldr/zccache/setup-soldr updates #253 (
ci(workflows): disable setup-soldr prebuild-deps (workaround upstream regression)). - setup-soldr PR that introduced default-on cook: feat(cook): default-on prebuild-deps via cargo-chef forge-ci/setup-soldr#140.
- Cook design doc: zackees/setup-soldr commit body of bd14e46.
🤖 Generated with Claude Code
Activity
zackees commentedon May 24, 2026
Research update — what's still blocking re-enabling cook
Current state in fbuild
zackees/setup-soldr@v0invocations across 10 workflow files in.github/workflows/(bench-205.ymlhas two). All 11 carryprebuild-deps: none. None pin to a SHA — every push tosetup-soldr@v0reaches CI immediately.prebuild-deps-flagsis unset everywhere (default--release).msrv.ymlsetstoolchain: 1.94.1explicitly; the rest read it fromrust-toolchain.toml.60a4ae3).template_native_build.ymlalready uses--target-dir "${PYTHON_TARGET_DIR}"for the python wheel build — that's the same isolation pattern soldr feat(bench): #205 AC#5 enforce <= 50 ms warm threshold in bench-fastled-examples #228 recommends as the safe path.Upstream status — the underlying bug is still open in code, "closed" only in tracking
Two relevant upstream issues, both closed without a code fix:
--target-dir". The expected behavior the reporter asked for ("rust-plan restore merges with the existing on-disk target artifacts and produces a valid Cargo target tree") was never implemented.No PR in either repo between PR #140 (2026-05-22) and
soldr@d3ba5f72/setup-soldr@99463f86(2026-05-23/24) addresses the rust-plan restore code path that produced fbuild's failure. So option #4 (wait for upstream) is currently blocked.Tool versions (as of 2026-05-24)
@v0(floating)>=1.8.2inpyproject.toml;zccache-artifact1.8in Cargo.tomlsoldr cooksoldr cookrequires soldr ≥ 0.7.x (soldr PR #409, merged 2026-05-21). The setup-soldr default already satisfies this. No minimum is tied to fbuild's1.94.1toolchain or the dylint nightly-2026-03-26 pin.cargo-chef capability
cargo chef cook --package <name>is supported —Reciperecordspub package: Option<Vec<String>>and forwards--package <name>to the inner cargo call. So option #3 (prebuild-deps-flags: "-p fbuild-cli -p fbuild-daemon") is plausibly correct at the chef layer. But the failure in PR #253 was not at the chef layer — it was at the soldr rust-plan restore step that runs after chef and before the user's cargo invocation. That code path is still the soldr #228 bug.Concrete blockers
To flip even one workflow from
prebuild-deps: noneto default cook:-pfilter on either side) — sidesteps the bug because cook's output and the user's build target the same package set. This is the lowest-risk first probe and matches cargo-chef's "same cwd, same args" guidance, or--target-dirfor the user build) — the workaround soldr feat(bench): #205 AC#5 enforce <= 50 ms warm threshold in bench-fastled-examples #228 itself recommends. Already proven to work intemplate_native_build.ymlfor the python wheel. Costs the warm-start benefit ontarget/but keeps cook's value for other workflows.Option #3 from the issue (
prebuild-deps-flags: "-p ...") is unverified — chef supports it, but the failure mode is downstream of chef.Suggested first probe
Pick
check-ubuntu.yml(lowest-blast-radius — single Ubuntu job, no board matrix). Dropprebuild-deps: none, leave the existingsoldr cargo check --workspace --all-targets(workspace-wide, no-p). If that reproduces the rust-plan restore error, fall back to option #1 with a dedicated--target-dir. Measure wall-clock against the current cold baseline; threshold from the issue is ≥ 30s/job.Also worth doing: pin every
zackees/setup-soldr@v0to the v0.9.2 SHA before the probe so a future upstream regression can't silently turn off the experiment.🤖 Generated with Claude Code
zackees commentedon May 24, 2026
Upstream trackers filed
For end-to-end visibility into when this is unblocked:
setup-soldr#159 — Default-on cook (PR #140) breaks downstream consumers with -p subset builds — track until rust-plan restore handles prepopulated target/ forge-ci/setup-soldr#159
Action-side ask: either make cook's filter align with the consumer's
-psubset, auto-detect collision and skip cook, or revert default toprebuild-deps: none.soldr#480 — Re-track: rust-plan restore fails on cook-prepopulated target/ (originally soldr#228, regression blast-radius widened by setup-soldr#140) forge-ci/soldr#480
Re-tracker for the rust-plan restore code path that produces the missing-
.rmetafailure (originally soldr#228; closed without fix; regression blast-radius widened by setup-soldr#140's default-on cook).Either issue closing-with-fix unblocks the option #4 path in this issue (wait for upstream). Until then, options #1 (separate
--target-dir, already proven intemplate_native_build.yml) and #2 (build full workspace, no-pfilter) remain the only working enablement paths.🤖 Generated with Claude Code
zackees commentedon May 30, 2026
Closing — all five acceptance criteria are now met via the recent cascade work:
✅ Per-workflow strategy chosen = option Fix ESP32-S3 PSRAM board configuration in board JSON database #3 from this ticket.
template_build.yml's setup-soldr config is now:The empty
prebuild-deps-flagsis the documented debug-profile signal; it makes cook'sfnonekey match what the workspace actually compiles, so the artifacts cook produces are exactly the artifacts cargo wants to reuse.✅
prebuild-deps: noneremoved from every relevant workflow — not one at a time, but all at once via the sharedtemplate_build.yml(which all ~71 boardbuild-*.ymlworkflows inherit) plus the core direct-Rust workflows (check-ubuntu/macos/windows, msrv, docs, dylint, fmt, acceptance-205, bench-205, template_native_build).✅ Measured time savings: PR perf(ci): lighter board caches — shared soldr cook, drop heavy target-cache #280 captured the win on a 72-board CI matrix — warm per-board wall-clock dropped from ~5 min → ~2 m 23 s (~55% reduction), with 17/20 zccache hits on the Rust workspace compile. Cache footprint dropped from ~6.7 GB to ~437 MiB total. Well above the 30 s/job threshold this ticket asked for.
✅ Roll-out done: PR perf(ci): lighter board caches — shared soldr cook, drop heavy target-cache #280 (initial enable + coarse shared key) and PR ci: adopt setup-soldr cache-preset: foundation in template_build #289 (migrate to
cache-preset: foundationafter setup-soldr v0.9.17 shipped the preset).✅ Upstream regression fixed: perf(cook): cargo-chef 0.0.1 version normalization poisons the warm build-cache for first-party crates forge-ci/soldr#566 / PR LPC845-BRK: deploy must always unwedge the shared VCOM (pyocd/SWD flash leaves CDC in Windows error 31) #565 —
soldr cookno longer leaves the workspace in the stubbed0.0.1skeleton state (the root cause of the shared-target-dir issue referenced in this ticket's body). Shipped in soldr 0.7.44 → setup-soldr v0.9.16, and now v0.9.19 ships soldr 0.7.45 + zccache 1.11.7 with additional depgraph drift detection.Closing as completed.