Skip to content

Conversation

@loewenheim
Copy link
Contributor

This adds support for reading and writing debug ids in sourcemaps.

Question: Do we also want SourceMapIndex to be able to have a debug id?

Copy link
Member

@Swatinem Swatinem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also want SourceMapIndex to be able to have a debug id?

Probably not I would say.

#[serde(skip_serializing_if = "Option::is_none")]
pub x_facebook_sources: FacebookSources,
#[serde(skip_serializing_if = "Option::is_none")]
pub debug_id: Option<DebugId>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the type is not #[non_exhaustive], but I believe it is not public so this should be fine.

@loewenheim loewenheim merged commit 70c51e4 into master Jul 19, 2023
@loewenheim loewenheim deleted the feat/debugid branch July 19, 2023 11:16
Boshen pushed a commit to oxc-project/oxc that referenced this pull request Oct 7, 2024
The sourcemap [`debugId`
proposal](https://github.com/tc39/source-map/blob/main/proposals/debug-id.md)
adds globally unique build or debug IDs to source maps and generated
code, making build artifacts self-identifying.

Support for debug IDs was added to
[`rust-sourcemap`](getsentry/rust-sourcemap#66)
in 2023 and Sentry have made use of this to aid in matching up source
and sourcemap files without having to worry about path mismatches or
release versions.

I want to add debug ID support to Rolldown but it uses `oxc::sourcemap`
so it looks like I need to start here first!
Boshen pushed a commit to oxc-project/oxc-sourcemap that referenced this pull request Dec 3, 2024
The sourcemap [`debugId`
proposal](https://github.com/tc39/source-map/blob/main/proposals/debug-id.md)
adds globally unique build or debug IDs to source maps and generated
code, making build artifacts self-identifying.

Support for debug IDs was added to
[`rust-sourcemap`](getsentry/rust-sourcemap#66)
in 2023 and Sentry have made use of this to aid in matching up source
and sourcemap files without having to worry about path mismatches or
release versions.

I want to add debug ID support to Rolldown but it uses `oxc::sourcemap`
so it looks like I need to start here first!
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.

4 participants