Skip to content

test: unify Vite in vite-test and test-dev-server#10293

Merged
graphite-app[bot] merged 1 commit into
mainfrom
07-15-refactor_unify_vite_in_vite-test_and_test-dev-server
Jul 15, 2026
Merged

test: unify Vite in vite-test and test-dev-server#10293
graphite-app[bot] merged 1 commit into
mainfrom
07-15-refactor_unify_vite_in_vite-test_and_test-dev-server

Conversation

@h-a-n-a

@h-a-n-a h-a-n-a commented Jul 15, 2026

Copy link
Copy Markdown
Member

Summary

Both browser test suites run on a vendored Vite, but each had its own copy: the dev-server harness used the packages/test-dev-server/vite submodule, and packages/vite-tests cloned vitejs/vite from the network on every run. This PR unifies them: the submodule moves to the repo root (vite/, tracking the rolldown-canary branch), and both suites build and test the same checkout, set up once with just setup-vite.

flowchart LR
  subgraph before [Before]
    S1[packages/test-dev-server/vite submodule] --> H1[dev-server tests]
    N1[network clone of vitejs/vite per run] --> V1[vite-tests]
  end
  subgraph after [After]
    S2[vite/ submodule at repo root] --> H2[dev-server tests]
    S2 --> V2[vite-tests]
  end
Loading

CI runs on the pinned commit; local runs follow the head of rolldown-canary.

h-a-n-a commented Jul 15, 2026

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.

@h-a-n-a
h-a-n-a force-pushed the 07-15-refactor_unify_vite_in_vite-test_and_test-dev-server branch 2 times, most recently from 35412d7 to 37b7675 Compare July 15, 2026 15:03
@h-a-n-a
h-a-n-a force-pushed the 07-14-docs_dev_add_hmr_design branch from d86b2c2 to 28254ba Compare July 15, 2026 15:03
@h-a-n-a
h-a-n-a changed the base branch from 07-14-docs_dev_add_hmr_design to graphite-base/10293 July 15, 2026 15:03
@h-a-n-a
h-a-n-a force-pushed the 07-15-refactor_unify_vite_in_vite-test_and_test-dev-server branch from 37b7675 to 603ba2c Compare July 15, 2026 15:04
@h-a-n-a
h-a-n-a force-pushed the graphite-base/10293 branch from 28254ba to 03e1e34 Compare July 15, 2026 15:04
@h-a-n-a
h-a-n-a changed the base branch from graphite-base/10293 to main July 15, 2026 15:04
@h-a-n-a
h-a-n-a force-pushed the 07-15-refactor_unify_vite_in_vite-test_and_test-dev-server branch from 603ba2c to 8a37a87 Compare July 15, 2026 15:32
@netlify

netlify Bot commented Jul 15, 2026

Copy link
Copy Markdown

Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit 0b44bbc
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/6a57c1e30cbb02000951444a
😎 Deploy Preview https://deploy-preview-10293--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.

@h-a-n-a
h-a-n-a force-pushed the 07-15-refactor_unify_vite_in_vite-test_and_test-dev-server branch from 8a37a87 to 5c7244e Compare July 15, 2026 15:55
@h-a-n-a

h-a-n-a commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

@h-a-n-a
h-a-n-a marked this pull request as ready for review July 15, 2026 16:02

h-a-n-a commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

Merge activity

  • Jul 15, 4:03 PM UTC: The merge label 'graphite: merge-when-ready' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jul 15, 5:22 PM UTC: h-a-n-a added this pull request to the Graphite merge queue.
  • Jul 15, 5:27 PM UTC: Merged by the Graphite merge queue.

@h-a-n-a
h-a-n-a requested a review from IWANABETHATGUY July 15, 2026 16:03
@h-a-n-a h-a-n-a changed the title refactor: unify Vite in vite-test and test-dev-server test: unify Vite in vite-test and test-dev-server Jul 15, 2026
<!--
- 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!
-->

## Summary

Both browser test suites run on a vendored Vite, but each had its own copy: the dev-server harness used the `packages/test-dev-server/vite` submodule, and `packages/vite-tests` cloned `vitejs/vite` from the network on every run. This PR unifies them: the submodule moves to the repo root (`vite/`, tracking the `rolldown-canary` branch), and both suites build and test the same checkout, set up once with `just setup-vite`.

```mermaid
flowchart LR
  subgraph before [Before]
    S1[packages/test-dev-server/vite submodule] --> H1[dev-server tests]
    N1[network clone of vitejs/vite per run] --> V1[vite-tests]
  end
  subgraph after [After]
    S2[vite/ submodule at repo root] --> H2[dev-server tests]
    S2 --> V2[vite-tests]
  end
```

CI runs on the pinned commit; local runs follow the head of `rolldown-canary`.
@graphite-app
graphite-app Bot force-pushed the 07-15-refactor_unify_vite_in_vite-test_and_test-dev-server branch from 5c7244e to 0b44bbc Compare July 15, 2026 17:22
@graphite-app
graphite-app Bot merged commit 0b44bbc into main Jul 15, 2026
32 of 33 checks passed
@graphite-app
graphite-app Bot deleted the 07-15-refactor_unify_vite_in_vite-test_and_test-dev-server branch July 15, 2026 17:27

@IWANABETHATGUY IWANABETHATGUY left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

graphite-app Bot pushed a commit that referenced this pull request Jul 17, 2026
…main (#10318)

## Problem

Since #10164 (and #10293 which unified the checkouts), `packages/vite-tests/run.ts` ran Vite's test suite on the commit pinned by the vite submodule gitlink. The `rolldown-canary` branch of vitejs/vite is regularly rebased and force-pushed, so any pinned commit rots quickly: the current pin `4d1480ca` is no longer on any branch. Worse, test adjustments landing on `rolldown-canary` cannot reach rolldown CI without a manual pin bump. That is exactly why CI on `main` is red right now: the `js-sourcemap` inline snapshot was updated on `rolldown-canary` on 2026-07-15 (for the output change from #10249), but the pin predates that update.

## Change

Restore the pre-#10164 approach from #7633. `run.ts` now does:

```
git clone --branch rolldown-canary https://github.com/vitejs/vite.git
git rebase origin/main
```

so test adjustments landing on `rolldown-canary` take effect right away, and new tests from Vite `main` surface incompatibilities with rolldown early. The rebase identity comes from the existing "Configure Git" step in the vite-test CI jobs.

All inline spec patches are removed from `run.ts`. Test adjustments belong on the `rolldown-canary` branch itself, not in a patch layer inside this repo:

- The `css-codesplit` style-/style2- patch was already dead code: upstream Vite `main` has had the swapped assertions since vitejs/vite#22922.
- The `assets` raw-query skip (#8839) is obsolete: the test passes on current rolldown `main`, in both serve and build.
- The `hmr-full-bundle-mode` invalidate patch is removed. This one still needs a spec fix on `rolldown-canary`: with client-side HMR there is no "hmr invalidate" server log anymore, so the spec should assert that `.invalidation-parent` becomes `child updated` instead. Until that lands on the canary branch, `test-serve` fails this single test.

Also reverts the `tsconfig.json` include added for the now-removed `checkout.ts` import, and updates the `repo-structure.md` description.

## Verification

Full local run against current rolldown `main` (debug build):

| Suite | Result |
| --- | --- |
| test-unit | 65 files passed |
| test-serve | 1 real failure: `hmr-full-bundle-mode > invalidate` (expected, see above) |
| test-build | 93 files passed, `js-sourcemap` snapshot green again |

`environment-react-ssr > deps reload` failed once under full-suite load but passes in isolation (timing flake with the slow debug binding, not a regression).

<!--
- 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!
-->
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.

3 participants