Repository navigation
Revert "fix(decode): ignore a debugId that is not a UUID (#536)" - #542
Merged
Merged
Conversation
Decoding keeps any `debugId` again, as 10.0.1 did, in `from_json`, `from_json_string` and index maps. Dropping a non-UUID broke rolldown: it converts a plugin's output map with `from_json`, so a `debugId` set by a plugin was lost, while Rollup keeps whatever the plugin set. Real-world maps also carry non-UUID debugIds, such as Bun's 32-hex form. The tc39 decoding test `debug-id/invalid-debug-id.map` expects such a value to be dropped. The harness now lists it as a known deviation, and fails if that test is renamed or removed.
Codex Review Summary: ✅ CompletedThis 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. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This reverts #536. Decoding keeps any
debugIdagain, as 10.0.1 did, infrom_json,from_json_stringand index maps. #536 is not released yet, so released behaviour does not change.Why
Dropping a non-UUID
debugIdbroke rolldown. Rolldown converts a plugin's output map withSourceMap::from_json, so adebugIdthat a plugin set ingenerateBundlewas lost, and itsplugin/generate-bundletest failed. Rollup keeps whatever value the plugin set.Real-world maps also carry non-UUID debugIds. Out of 72k maps from
node_modules, 392 have Bun's 32-hex form, from date-fns and @rc-component/picker, and #536 dropped all of them.tc39 tests
The decoding test
debug-id/invalid-debug-id.mapexpects a non-UUID to be dropped, so it now fails.tests/tc39_spec_tests.rslists it inKNOWN_DEVIATIONSwith the reason. The harness fails if a listed test is no longer in the suite, so the exception can't go stale.Tests
decode_debug_id_must_be_a_uuidis replaced bydecode_keeps_any_debug_id. It checks a UUID,"",dbgand a Bun-style ID throughfrom_json_string,from_jsonand an index map.encode_escape_debug_idchecks the full round trip again.Verification
cargo test --all-features, clippy and rustdoc pass, and the tc39 suites run. I built rolldown 5f600cba2 against this branch with only the newscopes/rangesstruct fields added. Itsplugin/generate-bundlefixture passes, and so does its main node suite (2022 tests).Written with AI assistance (Claude Code).