Repository navigation
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c2c168591
ℹ️ 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".
| let _ = (source_root, data_url); | ||
| None |
There was a problem hiding this comment.
Preserve input-map support through mutable-reference adapters
When a caller passes a mutable-reference wrapper as the writer (for example, Some(&mut map_ref) where map_ref: &mut ParcelSourceMap), this implementation silently disables inline source-map remapping even though the underlying implementation supports it. Both StyleSheet::to_css_impl and Bundler::load_file use S::from_data_url, so choosing S = &mut T loses the original source locations. If bundling used the concrete writer and printing subsequently uses the reference adapter, the bundled CSS source was never registered and the fallback mappings can even reference nonexistent output sources. Preserve access to an owned input-map reader rather than making the reference adapter unconditionally report that input maps are unreadable.
Useful? React with 👍 / 👎.
Merging this PR will not alter performance
Comparing Footnotes
|
6c2c168 to
73c0f35
Compare
c6503a0 to
88b1907
Compare
73c0f35 to
2b38861
Compare
88b1907 to
2ed94ad
Compare
2b38861 to
e334341
Compare
44992a0 to
43b17bc
Compare
e334341 to
d710de8
Compare
Superseded by #22, which passes the source map through
PrinterOptions.Summary
SourceMaptrait and a standalonecustom_sourcemapfeature.parcel_sourcemapbehind the existingsourcemapfeature and provide its trait adapter.Example
Consumers can provide their own source-map writer:
For example, a bundler can canonicalize two imported paths to one output source index while mappings still point to the correct source content.
Validation
cargo check --locked --workspace --all-featurescargo test --locked -p rspack-lightningcss --all-features(189 passed)cargo test --locked -p rspack-lightningcss --no-default-features --features bundler --test test_bundler_source_map(3 passed with the custom implementation)cargo check --locked -p rspack-lightningcss --no-default-features --features visitor --example custom_at_rule --test test_custom_parserby OpenAI Codex