Skip to content

perf(build): promote dependency-aware cache key to default, drop flag + --rebuild-dependents#5430

Draft
adrians5j wants to merge 1 commit into
nextfrom
claude/build-promote-dep-aware
Draft

perf(build): promote dependency-aware cache key to default, drop flag + --rebuild-dependents#5430
adrians5j wants to merge 1 commit into
nextfrom
claude/build-promote-dep-aware

Conversation

@adrians5j

Copy link
Copy Markdown
Member

Draft — merge only once the experimental flag has been validated. Pre-staged so it's ready to go the moment testing passes.

Promotes the dependency-aware build key (#5425) from opt-in to default and removes the now-redundant machinery.

Changes

  • Remove the WEBINY_EXPERIMENTAL_DEP_AWARE_CACHE gate + getOwnHashes; getBatches always uses the dependency-aware key.
  • Remove --rebuild-dependents: getBatches step 1.5, the rebuildDependents option, and the CI flag (edited WAC sources, regenerated push.yml / pullRequests.yml; yml diffs are pure flag removal).

Result: a plain yarn build rebuilds any changed package + all its dependents (workspace or resolved third-party) on its own.

⚠️ One-time full rebuild on merge

Stored meta.json holds own-source hashes (flag was off) and now mismatches the dependency-aware keys → every package is a miss on the first build → one full rebuild everywhere. The nightly global-cache rebuild absorbs it; heads-up for the team so a slow first CI build isn't alarming. Steady-state after is normal.

Before merging — validation checklist (flag on, on next)

  • WEBINY_EXPERIMENTAL_DEP_AWARE_CACHE=1 yarn build across normal dev flows
  • edit a workspace dep's export → plain build rebuilds dependents
  • merge/pull whack-a-mole case → no stale dist
  • bump a third-party version → dependents rebuild
  • webiny watch → build → dist correct
  • (optional) enable the flag in CI env first to bake it there before flipping

🤖 Generated with Claude Code

… + --rebuild-dependents

Promotes the dependency-aware build key from opt-in to default and removes the
now-redundant machinery.

- remove the `WEBINY_EXPERIMENTAL_DEP_AWARE_CACHE` gate + `getOwnHashes`;
  `getBatches` always uses the dependency-aware key
- remove `--rebuild-dependents`: getBatches step 1.5, the `rebuildDependents`
  option, and the CI flag (WAC sources + regenerated push.yml/pullRequests.yml)

A plain `yarn build` now rebuilds any changed package plus all its dependents
(workspace or resolved third-party) on its own.

NOTE: first build after this merges is a one-time full rebuild everywhere —
stored meta holds own-source hashes (flag was off) and now mismatches the
dependency-aware keys. The nightly global-cache rebuild absorbs it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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