Skip to content

test: make just setup-vite the only entry point that touches vite/#10332

Merged
graphite-app[bot] merged 1 commit into
mainfrom
07-17-test_make_just_setup-vite_the_only_entry_point_that_touches_vite_
Jul 17, 2026
Merged

test: make just setup-vite the only entry point that touches vite/#10332
graphite-app[bot] merged 1 commit into
mainfrom
07-17-test_make_just_setup-vite_the_only_entry_point_that_touches_vite_

Conversation

@shulaoda

@shulaoda shulaoda commented Jul 17, 2026

Copy link
Copy Markdown
Member

Fixes the staleness window pointed out in #10325 (comment): run.ts called ensureViteCheckout(), which can move vite/ to a new commit, but nothing rebuilds the dev-server side afterwards. loadVite() in test-dev-server only checks that vite/packages/vite/dist exists, not that it matches the checkout, so a vite-tests run could silently invalidate the dev-server test results.

Change

just setup-vite is the only entry point that touches vite/. It sets the commit (the latest rolldown-canary rebased onto the latest main) and finishes the whole setup (install, vite build, rolldown link) in one pass, so the checkout and the built vite dist can never drift apart.

packages/vite-tests/run.ts does no setup anymore. It clones the prepared vite/ checkout locally and goes straight to testing; when the checkout is missing it fails with a "run just setup-vite first" hint, like loadVite() already does. The checkout.ts import and the tsconfig include are reverted.

On CI, the vite-test jobs gain a setup-vite step before run.ts, like the dev-server workflow already has.

Verification

  • Missing checkout: run.ts fails with the "run just setup-vite first" hint.
  • Normal path: run.ts clones the prepared checkout and proceeds through install, build, and into the test suites.
  • ci.yml parses, both vite-test jobs have the setup step, and just lint is fully green.

Copy link
Copy Markdown
Member Author

How to use the Graphite Merge Queue

Add the label graphite: merge-when-ready to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@netlify

netlify Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit 9319e69
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/6a59b9a352456c0008121f18
😎 Deploy Preview https://deploy-preview-10332--rolldown-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@shulaoda
shulaoda marked this pull request as ready for review July 17, 2026 05:04
@shulaoda
shulaoda requested a review from sapphi-red as a code owner July 17, 2026 05:04
@shulaoda
shulaoda requested review from h-a-n-a and removed request for sapphi-red July 17, 2026 05:04
@graphite-app

graphite-app Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Merge activity

#10332)

Fixes the staleness window pointed out in #10325 (comment): `run.ts` called `ensureViteCheckout()`, which can move `vite/` to a new commit, but nothing rebuilds the dev-server side afterwards. `loadVite()` in test-dev-server only checks that `vite/packages/vite/dist` exists, not that it matches the checkout, so a vite-tests run could silently invalidate the dev-server test results.

## Change

**`just setup-vite`** **is the only entry point that touches** **`vite/`.** It sets the commit (the latest `rolldown-canary` rebased onto the latest `main`) and finishes the whole setup (install, vite build, rolldown link) in one pass, so the checkout and the built vite dist can never drift apart.

**`packages/vite-tests/run.ts`** **does no setup anymore.** It clones the prepared `vite/` checkout locally and goes straight to testing; when the checkout is missing it fails with a "run `just setup-vite` first" hint, like `loadVite()` already does. The `checkout.ts` import and the tsconfig include are reverted.

On CI, the vite-test jobs gain a setup-vite step before `run.ts`, like the dev-server workflow already has.

## Verification

- Missing checkout: `run.ts` fails with the "run `just setup-vite` first" hint.
- Normal path: `run.ts` clones the prepared checkout and proceeds through install, build, and into the test suites.
- `ci.yml` parses, both vite-test jobs have the setup step, and `just lint` is fully green.

<!--
- What is this PR solving? Write a clear and concise description.
- Reference the issues it solves (e.g. `fixes #123`).
- What other alternatives have you explored?
- Are there any parts you think require more attention from reviewers?

Also, please make sure you do the following:

- Read the Contributing Guidelines at https://rolldown.rs/contribution-guide/.
- Check that there isn't already a PR that solves the problem the same way. If you find a duplicate, please help us review it.
- Update the corresponding documentation if needed.
- Include relevant tests that fail without this PR but pass with it. If the tests are not included, explain why.

Thank you for contributing to Rolldown!
-->
@graphite-app
graphite-app Bot force-pushed the 07-17-test_make_just_setup-vite_the_only_entry_point_that_touches_vite_ branch from e00dbd7 to 9319e69 Compare July 17, 2026 05:12
@graphite-app
graphite-app Bot merged commit 9319e69 into main Jul 17, 2026
32 of 33 checks passed
@graphite-app
graphite-app Bot deleted the 07-17-test_make_just_setup-vite_the_only_entry_point_that_touches_vite_ branch July 17, 2026 05:16
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.

2 participants