feat(symbols): upload Swift/ObjC sources with dSYMs (--include-sources)#757
Open
abelonogov-ld wants to merge 12 commits into
Open
feat(symbols): upload Swift/ObjC sources with dSYMs (--include-sources)#757abelonogov-ld wants to merge 12 commits into
abelonogov-ld wants to merge 12 commits into
Conversation
Rename the symbol-map package/format from ldsm to dsymmap (magic DSMP), append the .dsymmap extension to the apple upload key, and accept apple/ios/dsym aliases for the --type flag. Co-authored-by: Cursor <cursoragent@cursor.com>
Parse Flutter ELF app.<arch>.symbols files (debug/elf + debug/dwarf), extract the Dart build id (.note.gnu.build-id) and DWARF, and compile them into the compact .dartmap symbol map (dsymmap codec). Upload to the Symbols Id lane (keyed by build id) and the Version lane (version + platform), and support local generation via `symbols generate`. Co-authored-by: Cursor <cursoragent@cursor.com>
Parse Flutter ELF app.<arch>.symbols files (debug/elf + debug/dwarf), extract the Dart build id (.note.gnu.build-id) and DWARF, and compile them into the compact .dartmap symbol map (dsymmap codec). Upload to the Symbols Id lane (keyed by build id) and the Version lane (version + platform), and support local generation via `symbols generate`. Co-authored-by: Cursor <cursoragent@cursor.com>
…y/ldcli into andrey/flutter-symbols * 'andrey/flutter-symbols' of ssh://github.com/launchdarkly/ldcli: feat(symbols): add Flutter (Dart AOT) symbol upload (--type flutter) panic fix fix demagling refactor(symbols): rename ldsm to dsymmap + apple type aliases apple dsym ingest
* andrey/flutter-symbols: fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an opt-in
--include-sourcestoldcli symbols upload --type apple-dsym, which packs the source files an image's DWARF references into a.srcbundleand uploads it beside the.dsymmap. The backend then renders the code around each symbolicated frame instead of justfile:line.Stacks on #756 — merge that first and this diff reduces to the source-bundle work.
What this adds
internal/symbols/srcbundle— the Source Bundle format: header, an index sorted by path for binary search, a string table, and per-file gzip streams. Mirrors.dsymmap's ethos and is byte-for-byte identical to the backend copy, with the sameMagic/Versiondrift guard. Per-file compression means the backend inflates exactly one file to answer a frame, not the archive.DW_AT_comp_dir.--include-sourceson bothsymbols uploadandsymbols generate.The key invariant
Files are keyed by the exact path string the sibling
.dsymmapstores, because both artifacts are produced from one DWARF pass. A resolved frame's file name is therefore the lookup key, with no path normalization on either side.Safety and opt-in
Off by default, because it ships your source to LaunchDarkly; the flag help says so explicitly.
Packing skips anything not readable locally (SDK and system sources, or a dSYM archived on another machine), anything over 2 MiB, and any extension the UI can't render. If nothing local turns up it prints a note and uploads the map alone, so
--include-sourcesnever breaks an upload that would otherwise succeed.Testing
./cmd/symbols/...and./internal/symbols/...pass. New tests cover the format round trip, window clamping at file edges, files without a trailing newline, truncated/garbage input, keying by DWARF path rather than local path, skipping unreadable and oversize files, and that the real fixture dSYM (whose sources aren't on this machine) degrades to map-only instead of failing.Verified end to end against a real iOS Release build.
Made with Cursor