Skip to content

chore(dev): shared compile cache and worktree helper - #1477

Open
duncanista wants to merge 5 commits into
jordan.gonzalez/release-symbols/featurefrom
jordan.gonzalez/dev-build-cache/feature
Open

duncanista wants to merge 5 commits into
jordan.gonzalez/release-symbols/featurefrom
jordan.gonzalez/dev-build-cache/feature

Conversation

@duncanista

@duncanista duncanista commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

TL;DR: A script that sets up sccache and one shared build directory, plus a helper for git worktrees.

Why: A cold bottlecap build takes minutes, and with one worktree per change each one rebuilt everything. This shares the dependency builds across worktrees, while each worktree still builds its own bottlecap code.

Overview

Jira: SVLS-9976

Stacked on #1476 (jordan.gonzalez/release-symbols/feature).

Opt-in helpers to build and test bottlecap fast in many worktrees. Nothing edits shell rc
files, ~/.cargo/config.toml or Docker settings.

  • scripts/dev/setup-build-cache.sh: finds or installs a pinned sccache (v0.19.0, sha256
    checked) and prints the env for one shared CARGO_TARGET_DIR. --tests gives a
    per-worktree target dir for tests that spawn the bottlecap binary.
  • scripts/dev/worktree.sh: creates a git worktree that uses the shared cache.
  • scripts/dev/README.md: usage, the reason for one shared target dir, lock contention, and
    how to get the release binaries from the symbols job.
  • AGENTS.md: a short "Build and test fast" section.
  • .gitignore: .worktrees.

Size: 291 core lines, 456 lines in total.

Testing

  • applies on the previous PR of the stack: pass
  • shellcheck 0.10.0 on the new scripts: pass

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T20:34:30.560949Z c7f16a1 New commits
🔒 Security Review ✅ Completed 2026-10-30T20:37:16.068531Z c7f16a1 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 83bd013cec

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/dev/setup-build-cache.sh Resolved
Comment thread scripts/dev/worktree.sh Resolved
Comment thread scripts/dev/setup-build-cache.sh Resolved
Comment thread scripts/dev/setup-build-cache.sh Resolved
@duncanista duncanista changed the title [SVLS-9976] chore(dev): shared compile cache and worktree helper chore(dev): shared compile cache and worktree helper Oct 28, 2026
@datadog-datadog-prod-us1-2

This comment has been minimized.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1447a0e5ee

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/dev/setup-build-cache.sh Resolved
Comment thread scripts/dev/setup-build-cache.sh Resolved
Comment thread scripts/dev/worktree.sh Resolved
Comment thread scripts/dev/setup-build-cache.sh Resolved
Comment thread scripts/dev/setup-build-cache.sh Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 111f247bc3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/dev/README.md Resolved
Comment thread scripts/dev/worktree.sh Resolved
Comment thread scripts/dev/setup-build-cache.sh Resolved
Comment thread scripts/dev/setup-build-cache.sh Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c7f16a1faf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +134 to +136
if [ -n "${SCCACHE_BIN:-}" ] && [ -x "$SCCACHE_BIN" ]; then echo "$SCCACHE_BIN"; return 0; fi
if [ -x "$TOOLS_DIR/bin/sccache" ]; then echo "$TOOLS_DIR/bin/sccache"; return 0; fi
if command -v sccache >/dev/null 2>&1; then command -v sccache; return 0; fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make discovered sccache paths absolute before exporting

When SCCACHE_BIN names a relative executable, or sccache is found through a relative PATH entry, find_sccache returns that relative path unchanged. In the documented eval "$(scripts/dev/setup-build-cache.sh)" && cd bottlecap && cargo build flow, the exported RUSTC_WRAPPER is then resolved from bottlecap/ rather than the directory where it was found, so Cargo cannot launch the wrapper; canonicalize the discovered executable before printing the export.

AGENTS.md reference: AGENTS.md:L17-L17

Useful? React with 👍 / 👎.

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