Cache workspace typechecks with Vite+ - #2
Draft
wan9chi wants to merge 7 commits into
Draft
Conversation
Scope checkThis PR changes 1,127 lines across 24 files. Large PRs are harder to review and more likely to be closed without review. If this scope is intentional, no action needed. A maintainer will review it. If not, please consider splitting this into smaller PRs. See CONTRIBUTING.md for contribution guidelines. |
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds Vite+ as a workspace development dependency and uses its task runner to cache package, demo, and template typechecks. Astro checks are split into
astro syncandastro check --noSyncso the generated project state is tracked separately from the check.The package typecheck runner uses parallel scheduling to tolerate the repository's existing
emdash/@emdash-cms/auth-atprotoworkspace cycle. For this fork-only PR, non-typecheck jobs in the CI workflow are skipped outsideemdash-cms/emdash, leaving Typecheck as the only active CI job.The Typecheck job follows the official Vite+ GitHub Actions cache guide: after the existing pnpm install, it restores
node_modules/.vite/task-cachewith a per-run key and OS/architecture restore prefix, then saves the updated cache after a successful run. The repository's existing pnpm and Node setup remains unchanged;voidzero-dev/setup-vpis not used.Cross-run cache validation
d1fd84aavite-task-Linux-X64-29229148136-10/27, demos0/4, templates0/18hitsa07f1ee4plugin-typesand dependents missed; packages10/27, demos0/4, templates0/18hits2599313a10/27, demos0/4, templates0/18hitsd5544aeb18/27with 32.46s saved; demos0/4, templates0/18hitsThe GitHub cache layer works: every run after the baseline restores the newest cache for the pull request and saves a new immutable entry. Vite Task correctly invalidates related inputs and reuses some unchanged package tasks. Cross-run reuse is not yet stable for every task: the uncached
pnpm buildchanges or removes hasheddistfiles consumed by typechecks, while Astro tasks track generatednode_modules/.vitepaths that are absent on fresh runners. This matches the guide's warning that cross-run Vite Task caching is experimental and should be measured per project.Closes: N/A — fork-only CI experiment.
Type of change
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpasses (or targeted tests for my change)pnpm formathas been runmessages.pochanges except in translation PRs — a workflow extracts catalogs on merge tomain.pnpm formatwas not run across the whole repository; targeted Prettier checks pass for every changed JSON/YAML file. Tests, i18n, changeset, and Discussion requirements are not applicable because this is fork-only CI/tooling work affecting private workspace packages. The targeted package, demo, and template typechecks all pass.AI-generated code disclosure
Screenshots / test output
pnpm install --frozen-lockfilepnpm typecheck— passes; immediate local warm run has 27/27 cache hitspnpm typecheck:demos:ci— passes; immediate local warm run has 4/4 cache hitspnpm typecheck:templates— passes; immediate local warm run has 18/18 cache hitspnpm lintpnpm lint:quickprettier --checkgit diff --check