Skip to content

fix(rolldown): preserve missing and zero comparison metrics - #631

Draft
SaKaNa-Y wants to merge 1 commit into
vitejs:mainfrom
SaKaNa-Y:fix/compare-module-metrics
Draft

SaKaNa-Y wants to merge 1 commit into
vitejs:mainfrom
SaKaNa-Y:fix/compare-module-metrics

Conversation

@SaKaNa-Y

@SaKaNa-Y SaKaNa-Y commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Comparing a module with no transform measurement against one with a measurement reports false growth from zero. A real zero also gets a new ratio label, and reopening a log can replace its final zero with an earlier nonzero size.

Preserve unavailable measurements through the module comparison RPC, rows and totals. Keep those matched modules accessible in an Unavailable category. Preserve measured zero in detail badges and cached metrics, and rebuild old derived caches.

module present + no measurement → unavailable, no numeric delta
module present + measured zero → 0 B
module absent → Added / Removed membership

Follow-up to #615 and #601.

Evidence

  • Before: missing → 42 B reports +42 B; a cached transform sequence ending in 1 B → 0 B restores a final 1 B.
  • After: missing → 42 B has a null delta; cold, cached and hydrated metrics preserve the final zero.
  • pnpm lint, pnpm typecheck and pnpm build passed (7 build tasks).
  • pnpm test --run: 410 passed, 2 skipped. Regressions cover RPC JSON transport, incomplete totals, zero baselines and cache restoration.
  • Executed Vue setup controls preserve detail-close filters and select the final zero. Full browser acceptance was not rerun.

Merge Danger

Door: two-way

Blast Radius: comparison

Module comparison values can now be null, with an unavailable status for matched modules. Shared comparison components handle these values. The cache version change rebuilds derived log caches on the next read; source logs stay intact.

@pkg-pr-new

pkg-pr-new Bot commented Nov 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vitejs/devtools

npm i https://pkg.pr.new/@vitejs/devtools@631

@vitejs/devtools-kit

npm i https://pkg.pr.new/@vitejs/devtools-kit@631

@vitejs/devtools-oxc

npm i https://pkg.pr.new/@vitejs/devtools-oxc@631

@vitejs/devtools-rolldown

npm i https://pkg.pr.new/@vitejs/devtools-rolldown@631

@vitejs/devtools-vite

npm i https://pkg.pr.new/@vitejs/devtools-vite@631

@vitejs/devtools-vitest

npm i https://pkg.pr.new/@vitejs/devtools-vitest@631

commit: 3d86a6f

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