-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support debug ids #66
Conversation
There was a problem hiding this 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.
@@ -49,6 +50,8 @@ pub struct RawSourceMap { | |||
pub x_metro_module_paths: Option<Vec<String>>, | |||
#[serde(skip_serializing_if = "Option::is_none")] | |||
pub x_facebook_sources: FacebookSources, | |||
#[serde(skip_serializing_if = "Option::is_none")] | |||
pub debug_id: Option<DebugId>, |
There was a problem hiding this comment.
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.
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!
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?