Repository navigation
fix(sources): preserve missing source contents as null - #16366
Conversation
Deploying rspack with
|
| Latest commit: |
3997e14
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9ec5c4c8.rspack-v2.pages.dev |
| Branch Preview URL: | https://codex-fix-sourcemap-null-con.rspack-v2.pages.dev |
📦 Binary Size-limit
❌ Size increased by 8.00KB from 67.91MB to 67.91MB (⬆️0.01%) |
|
@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. |
Rsdoctor Bundle Diff AnalysisFound 5 projects in monorepo, 0 projects with changes. 📊 Quick Summary
Generated by Rsdoctor GitHub Action |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5397fc9f59
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
Merging this PR will not alter performance
Comparing Footnotes
|
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 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". |
|
📝 Rspack Ecosystem CI: Open
|
Motivation
Fixes #16347.
When a loader omits source content and its map is combined with a map that includes content, Rspack emits
""for the missing entry. DevTools treats that entry as an empty file instead of loading the source URL. Missing content must remain distinct from an explicitly empty source.Changes
Represent each
SourceMap.sources_contententry asOption<Cow<str>>. PreserveNonethrough both JSON parsing paths, map composition, serialization, and persistent cache, emittingnullfor missing entries while keepingSome("")as"". Pad mixed content arrays to match the source table and omitsourcesContentonly when all entries are missing.When intermediate source text is unavailable during map composition, use the existing outer-mapping fallback and honor
remove_original_sourcewithout unwrapping missing content. Explicitoriginal_sourcestill takes precedence.Update map producers and consumers and
MappingSourceJSON streaming. Add loader regression cases for regular and cheap module source maps covering missing, empty, and present content.Validation:
5397fc9: 136 passed.rspack_sources --all-features: 77 tests and 11 doctests passed.rspack_sourcesandrspack_cacheable_testwith--all-targets --all-features -- -D warnings.Chrome DevTools behavior was not tested interactively; validation covers the emitted source-map data.