-
-
Notifications
You must be signed in to change notification settings - Fork 236
Description
If sentry-cli sourcemaps inject detects an existing // debugId=... comment, it skips injecting a Debug ID into that file. The underlying assumption is that if there is a // debugId=... comment, then Sentry CLI has already injected this file, and importantly, has stored the Debug ID in a global variable that the SDK can access. However, other tools can also add // debugId comments without also storing the Debug ID in a global variable, which is a problem, since the CLI will skip injection, but the SDK won't know what the Debug ID is since it is not stored in a global variable.
We don't want to set the debug ID global variable twice – this is the reason we need some way to avoid re-injecting the same files twice. However, our current logic produces false positives.
To ensure we only skip files injected by Sentry CLI, we will add another comment which indicates that the file has been injected with debug files by Sentry CLI. In case we ever change injection logic, we may wish to consider adding the version number into this comment, so we know which version of Sentry CLI performed the injection.
Metadata
Metadata
Assignees
Labels
Projects
Status