Try to identify dSYMs by UUID not channel (#28268)

This should make it possible to more reliably symbolicate crash reports
from nightly, and from users with pending auto-updates.


Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben.kunkle@gmail.com>
This commit is contained in:
Conrad Irwin 2025-04-07 16:08:38 -06:00 committed by GitHub
parent 862d0c07ca
commit f03efeda73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 7 deletions

View file

@ -191,11 +191,13 @@ function prepare_binaries() {
local app_path=$2
echo "Unpacking dSYMs for $architecture"
if ! dsymutil --flat target/${architecture}/${target_dir}/Zed 2> target/dsymutil.log; then
exe_path="target/${architecture}/${target_dir}/Zed"
if ! dsymutil --flat "${exe_path}" 2> target/dsymutil.log; then
echo "dsymutil failed"
cat target/dsymutil.log
exit 1
fi
uuid=$(dwarfdump --uuid "${exe_path}" | cut -d ' ' -f 2 | tr 'A-F' 'a-f')
version="$(cargo metadata --no-deps --manifest-path crates/zed/Cargo.toml --offline --format-version=1 | jq -r '.packages | map(select(.name == "zed"))[0].version')"
if [ "$channel" == "nightly" ]; then
version="$version-$(git rev-parse --short HEAD)"
@ -207,11 +209,11 @@ function prepare_binaries() {
echo "Gzipping dSYMs for $architecture"
gzip -f target/${architecture}/${target_dir}/Zed.dwarf
echo "Uploading dSYMs for $architecture"
echo "Uploading dSYMs${architecture} for $architecture to by_uuid/${uuid}.dwarf.gz"
upload_to_blob_store_public \
"zed-debug-symbols" \
target/${architecture}/${target_dir}/Zed.dwarf.gz \
"$channel/Zed-$version-${architecture}.dwarf.gz"
"by-uuid/${uuid}.dwarf.gz"
cp target/${architecture}/${target_dir}/zed "${app_path}/Contents/MacOS/zed"
cp target/${architecture}/${target_dir}/cli "${app_path}/Contents/MacOS/cli"