feat: debug-files check — parse DIFs via @sentry/symbolic (WASM)#1109
Conversation
|
Codecov Results 📊✅ Patch coverage is 84.62%. Project has 5051 uncovered lines. Files with missing lines (2)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 81.23% 81.23% —%
==========================================
Files 386 388 +2
Lines 26831 26910 +79
Branches 17427 17481 +54
==========================================
+ Hits 21795 21859 +64
- Misses 5036 5051 +15
- Partials 1810 1825 +15Generated by Codecov Action |
|
Holding this PR. Per the plan, we're publishing Blocked on: getsentry/symbolic#986 (adds the Once
Marking as draft until then. |
ee9d903 to
91b865e
Compare
debug-files checkdebug-files check — parse DIFs via @sentry/symbolic (WASM)
91b865e to
dbaa6c8
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit dbaa6c8. Configure here.
Implements `sentry debug-files check` — inspect a debug information file and print its debug id, code id, arch, kind, and feature flags. Supports Mach-O/dSYM, ELF, PE/PDB, Portable PDB, WASM, Breakpad, and source bundles. Local-only; parses in-process via the @sentry/symbolic WASM module — no native binary and no dependency on the legacy Rust sentry-cli. - src/lib/dif/index.ts: typed API over @sentry/symbolic with a dual-mode loader (SEA getRawAsset / npm sibling / dev package resolve) - src/commands/debug-files/check.ts: the command (auto-detects format, exits non-zero when unusable for symbolication) - @sentry/symbolic@13.3.0 as a devDependency (bundled at build); the .wasm is embedded as a SEA asset (build.ts) and shipped as an npm sibling (bundle.ts), both sourced from node_modules/@sentry/symbolic - tests use deterministic Breakpad text fixtures; format/kind use the canonical lowercase names (elf, lib, breakpad) matching symbolic-cabi Validated in all three runtime modes: dev (tsx), SEA binary, npm bundle.
dbaa6c8 to
6ba59af
Compare

Summary
Adds
sentry debug-files check— inspect a debug information file and print its debug id, code id, architecture, kind, and feature flags. Supports Mach-O/dSYM, ELF, PE/PDB, Portable PDB, WebAssembly, Breakpad, and source bundles.Parsing is done in-process via
@sentry/symbolic(thesymbolicRust crate compiled to WASM) — no native binary and no dependency on the legacy Rustsentry-cli.How it works
@sentry/symbolic@13.3.0(published from getsentry/symbolic#986) is a devDependency — the JS glue is bundled by esbuild, and the.wasmis loaded lazily on first use across all three runtime modes:.wasmis embedded as a fossilize asset (build.tscopies it fromnode_modules/@sentry/symbolicintodist-build/); loaded vianode:sea.getRawAsset()..wasmis shipped as a sibling (bundle.tscopies it todist/vendor/); loaded relative to the bundle.@sentry/symbolicpackage.The
@sentry/symbolic/symbolic_bg.wasmsubpath is markedexternalso esbuild never tries to inline it; the runtimerequire.resolveis only reached in dev.All three modes were validated locally (built and ran
dist-bin/sentry-linux-x64anddist/bin.cjs; both parse correctly).Files
src/lib/dif/index.ts@sentry/symbolicsrc/commands/debug-files/check.tsscript/build.ts/script/bundle.ts.wasmfromnode_modules/@sentry/symbolicpackage.json@sentry/symbolicdevDependency + npmfilesentryTesting
15 tests (9 dif lib + 6 command) using deterministic Breakpad text fixtures — no committed binaries, identical on every platform. Covers usable/unusable exit codes, error paths,
--json, and a nil-debug-id format guard. Format/kind use the canonical lowercase.name()strings (elf,lib,breakpad) matchingsymbolic-cabi/Python.Notes
@sentry/symbolic@13.3.0(already published).debug-files find, defaultupload(metadata tier); source tier (bundle-sources/print-sources/upload --include-sources).