Skip to content

feat(mf): report concrete shared provider metadata - #15687

Draft
ScriptedAlchemy wants to merge 1 commit into
mainfrom
codex/mf-provider-metadata-draft
Draft

ScriptedAlchemy wants to merge 1 commit into
mainfrom
codex/mf-provider-metadata-draft

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Contributor

Motivation

Propose the native Rspack implementation for RFC #5082.

A build can provide two implementations under one shared key. The current manifest has one summary version and a combined asset list, so a reader cannot associate each version with its files.

Changes

Add optional shared[].providers records to mf-stats.json and mf-manifest.json. Each record contains a version, a resolved import relative to the build context, and its assets.

For example, two implementations of react can report these pairs:

Version Import JavaScript assets
18.3.1 ./react18.js react18.js
19.0.0 ./react19.js react19.js

Existing shared fields remain unchanged. The array is omitted for zero or one provider and when asset analysis is disabled. Runtime registration and version selection do not change.

This is an independent draft based on main, outside the layers stack. It keeps main's existing name-based grouping. Scope/layer reconciliation, provider-specific fallback metadata, and cross-bundler parity remain open in the RFC. The core prototype is #5083.

StatsSharedProvider derives Clone because existing shared stats and manifest records are cloneable. Cloning copies the owned version, import, and asset paths.

Verification

  • Frozen offline install, JavaScript build, scoped Cargo check, and fresh native binding build passed.
  • An independent rerun passed 14 manifest integration tests, including the new fixture in both runtime modes.
  • Emitted JSON contains separate version/import/asset records and retains aggregate assets. Single-provider, consumer-only, and disabled-analysis outputs omit providers.
  • Rust formatting, documentation formatting, and whitespace checks passed. No Cargo configuration or dependency files changed.

The complete earlier prototype, including layer-aware grouping and fallback enrichment, remains preserved at f0a9c614.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rspack with  Cloudflare Pages  Cloudflare Pages

Latest commit: dda1f5f
Status: ✅  Deploy successful!
Preview URL: https://7fee2fd0.rspack-v2.pages.dev
Branch Preview URL: https://codex-mf-provider-metadata-d.rspack-v2.pages.dev

View logs

@github-actions

Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing dda1f5f to fix: align inline loader module types with webpack (#15684) by harpsealjs

❌ Size increased by 24.00KB from 68.82MB to 68.84MB (⬆️0.03%)

@github-actions

Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Gzip Size Change Gzip Change
react-10k 5.3 MB 1.3 MB 0 0
popular-libs 1.7 MB 523.6 KB 0 0
react-5k 2.6 MB 662.0 KB 0 0
react-1k 799.2 KB 217.5 KB 0 0
ui-components 4.9 MB 1.4 MB 0 0

Generated by Rsdoctor GitHub Action

@codspeed

codspeed Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 50 untouched benchmarks
⏩ 47 skipped benchmarks1


Comparing codex/mf-provider-metadata-draft (dda1f5f) with main (cd25c7d)

Open in CodSpeed

Footnotes

  1. 47 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

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