Conversation
Deploying rspack with
|
| Latest commit: |
b67ed7a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f279ecf5.rspack-v2.pages.dev |
| Branch Preview URL: | https://codex-loader-metadata.rspack-v2.pages.dev |
📦 Binary Size-limit
🎉 Size decreased by 12.00KB from 68.79MB to 68.78MB (⬇️0.02%) |
Rsdoctor Bundle Diff AnalysisFound 5 projects in monorepo, 0 projects with changes. 📊 Quick Summary
Generated by Rsdoctor GitHub Action |
Merging this PR will degrade performance by 0.03%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | rust@create_full_hash |
2.3 ms | 2.4 ms | -2.18% |
| ⚡ | rust@create_module_hashes |
7.6 ms | 7.4 ms | +2.17% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing codex/loader-metadata (b67ed7a) with main (7163c74)
Footnotes
-
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. ↩
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
55b3464 to
241276d
Compare
3280b36 to
f1bc654
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
32dd6cc to
d5cf27b
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
037fbe4 to
b67ed7a
Compare
Motivation
Resolved loader metadata should be reusable across runs, while pitch data and execution flags belong to each run. The JavaScript bridge also used to combine both in
JsLoaderItem, converting unchanged loader requests, types and cache flags back to Rust on each return.For example, with
JavaScript loader -> builtin:swc-loader -> JavaScript loader, each JavaScript invocation can update dependencies and pitch data and return{ loaderData, state }without repeating loader metadata. Each loader retains its own pitch data for its normal stage, while content, source maps and additional data pass along the pipeline as one current value each. A rebuild reuses the resolved native metadata but starts with fresh execution flags and pitch data.Changes
Loadersdirectly on the normal module, backed byVec<ResolvedLoader>and lazily initialized immutableLoaderItemmetadata. Access it throughLoaderRunnerContext::loaders().loader_dataandLoaderItemStatecollections for each native run, indexed by loader position. Keep each loader's pitch data separate from execution flags, and mirror the split in the binding withloaderData,JsLoaderMetadataandJsLoaderItemState.#[napi(object)] JsLoaderContextStateand a separateloaderDataarray to JavaScript. The existing loader-context getters/setters update them, and the runner returns both through a single#[napi(object)] JsLoaderResultfor Rust to merge.finish_calledonly for loaders whose normal stage has executed. Previously, an unrelated JavaScript return could mark a pending builtin loader as finished and incorrectly preserve its input when it returned no output.Stack
main).The class/boxed-context ownership protocol, BoxSource transfer and cross-invocation JavaScript wrapper reuse remain separate follow-up work.
Validation
pnpm run build:cli:dev— passed.cargo clippy -p rspack_binding_api -p rspack_loader_runner --all-targets --offline -- -D warnings— passed.cargo test -p rspack_loader_runner --offline— 10 passed.pnpm --dir tests/rspack-test run test --project base -t loader— 567 passed, including parallel loaders, cache/rebuild cases and the new state regressions.pnpm --dir tests/rspack-test run test --project base Config -t source-map— 184 passed.git diff --check— passed.by OpenAI Codex