docs(apple): Add swift_ast stripping guide for dSYM uploads#17105
docs(apple): Add swift_ast stripping guide for dSYM uploads#17105
Conversation
Add shared include with explainer and script to zero out __swift_ast sections in dSYMs before uploading. This section is only used for LLDB debugging and can account for the majority of dSYM size with DWARF v5. Include is referenced from both the Size Analysis and Build Distribution pages under a new "Uploading Best Practices" section. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
| done | ||
| done < <(find "$DSYMS_DIR" -name "*.dSYM" -type d) | ||
|
|
||
| TOTAL_MB=$(echo "scale=1; $TOTAL_ZEROED / 1048576" | bc) |
There was a problem hiding this comment.
Oops can you update this to 1000000 for MB units.
| @@ -0,0 +1,149 @@ | |||
| For optimal processing speeds, strip `__swift_ast` from your dSYMs before uploading to Sentry. This section of the binary is a copy of your code's swiftmodule file and is only used for runtime debugging with LLDB. It is not required for symbolication, Size Analysis, or Build Distribution. | |||
|
|
|||
| The script below can be used to strip `__swift_ast` from your dSYMs. The xcarchive is modified in-place. Back up first if needed. | |||
There was a problem hiding this comment.
Might be worth mentioning that the script requires python3 and some Xcode tools, though those should already be installed on virtually any macOS CI machine.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
|
|
||
| zeroed=$(strip_binary "$binary") | ||
| if [[ "$zeroed" -gt 0 ]]; then | ||
| zeroed_mb=$(echo "scale=1; $zeroed / 1048576" | bc) |
There was a problem hiding this comment.
Inconsistent MB divisor between per-file and total output
Medium Severity
The per-file size on line 140 divides by 1048576 (MiB) while the total on line 148 divides by 1000000 (MB), but both label the result as "MB". This means the per-file values and the summary total use different units, producing misleading output. The PR discussion indicates the intent was to use 1000000 everywhere for MB units, so line 140's divisor appears to have been missed during that update.


DESCRIBE YOUR PR
Add documentation for stripping
__swift_astsections from dSYMs before uploading to Sentry. This section is only used for LLDB debugging and can make up the majority of dSYM size with DWARF v5.__swift_astIS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes: