Skip to content

Revert "fix(decode): ignore a debugId that is not a UUID (#536)" - #542

Merged
Boshen merged 1 commit into
mainfrom
revert-debug-id-uuid-check
Dec 1, 2026
Merged

Boshen merged 1 commit into
mainfrom
revert-debug-id-uuid-check

Conversation

@Boshen

@Boshen Boshen commented Dec 1, 2026

Copy link
Copy Markdown
Member

This reverts #536. Decoding keeps any debugId again, as 10.0.1 did, in from_json, from_json_string and index maps. #536 is not released yet, so released behaviour does not change.

Why

Dropping a non-UUID debugId broke rolldown. Rolldown converts a plugin's output map with SourceMap::from_json, so a debugId that a plugin set in generateBundle was lost, and its plugin/generate-bundle test 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.map expects a non-UUID to be dropped, so it now fails. tests/tc39_spec_tests.rs lists it in KNOWN_DEVIATIONS with 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_uuid is replaced by decode_keeps_any_debug_id. It checks a UUID, "", dbg and a Bun-style ID through from_json_string, from_json and an index map.
  • encode_escape_debug_id checks 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 new scopes/ranges struct fields added. Its plugin/generate-bundle fixture passes, and so does its main node suite (2022 tests).

Written with AI assistance (Claude Code).

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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-01T03:37:14.919729Z c243eec PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Boshen
Boshen merged commit 932a505 into main Dec 1, 2026
6 of 7 checks passed
@Boshen
Boshen deleted the revert-debug-id-uuid-check branch December 1, 2026 03:38
@oxc-guard oxc-guard Bot mentioned this pull request Dec 1, 2026
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