Skip to content

[msbuild] Copy dSYMs from xcframeworks next to the app's dSYM. Fixes #23076.#25979

Draft
rolfbjarne wants to merge 3 commits into
mainfrom
dev/rolf/issue-23076-copy-dsyms-from-xcframeworks
Draft

[msbuild] Copy dSYMs from xcframeworks next to the app's dSYM. Fixes #23076.#25979
rolfbjarne wants to merge 3 commits into
mainfrom
dev/rolf/issue-23076-copy-dsyms-from-xcframeworks

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

Add a new _CopyXCFrameworkDSyms MSBuild target that copies pre-existing dSYMs
from xcframeworks next to the app's dSYM, so that they're included in the
archive when the app is archived.

The target uses Inputs/Outputs for incremental build support.

Also add an ArchiveDir MSBuild property to the Archive task, which allows
specifying a custom archive directory instead of computing a unique path
under ~/Library/Developer/Xcode/Archives.

Also modify the test-libraries Makefile to run dsymutil on dynamic framework
binaries and include the resulting dSYMs in xcframeworks.

Fixes #23076

🤖 Pull request created by Copilot

…23076.

Add a new _CopyXCFrameworkDSyms MSBuild target that copies pre-existing dSYMs
from xcframeworks next to the app's dSYM, so that they're included in the
archive when the app is archived.

The target uses Inputs/Outputs for incremental build support.

Also add an ArchiveDir MSBuild property to the Archive task, which allows
specifying a custom archive directory instead of computing a unique path
under ~/Library/Developer/Xcode/Archives.

Also modify the test-libraries Makefile to run dsymutil on dynamic framework
binaries and include the resulting dSYMs in xcframeworks.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

…rameworks.

The xcframeworks now include dSYMs for dynamic frameworks, so the test
verifying zip contents needs to expect the dSYM entries as well.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 5a9641eb2adda09897de237bda322ac845ee607e [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 [CI Build #5a9641e] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

0 tests crashed, 5 tests failed, 194 tests passed.

Failures

❌ dotnettests tests (iOS)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.DotNetProjectTest.LibraryReferencingBindingLibrary...: No missing files
      Assert.That(missing, Is.Empty)
      Expected:
      But was: < "XTest.xcframework/ios-arm64/dSYMs", "XTest....

Html Report (VSDrops) Download

❌ dotnettests tests (MacCatalyst)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.DotNetProjectTest.LibraryReferencingBindingLibrary...: No missing files
      Assert.That(missing, Is.Empty)
      Expected:
      But was: < "XTest.xcframework/ios-arm64_x86_64-maccatal...

Html Report (VSDrops) Download

❌ dotnettests tests (macOS)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.DotNetProjectTest.LibraryReferencingBindingLibrary...: No extra files
      Assert.That(extra, Is.Empty)
      Expected:
      But was: < "XTest.xcframework/macos-arm64_x86_64/dSYMs/XTes...

Html Report (VSDrops) Download

❌ dotnettests tests (tvOS)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.DotNetProjectTest.LibraryReferencingBindingLibrary...: No missing files
      Assert.That(missing, Is.Empty)
      Expected:
      But was: < "XTest.xcframework/tvos-arm64/dSYMs", "XTest...

Html Report (VSDrops) Download

❌ windows tests

1 tests failed, 2 tests passed.

Failed tests

  • Local .NET tests/Xamarin.Tests.DotNetProjectTest.LibraryReferencingBindingLibrary(TVOS): Failed: No missing files

  • Local .NET tests/Xamarin.Tests.DotNetProjectTest.LibraryReferencingBindingLibrary(MacOSX): Failed: No missing files

  • Local .NET tests/Xamarin.Tests.DotNetProjectTest.LibraryReferencingBindingLibrary(MacCatalyst): Failed: No missing files

  • Local .NET tests/Xamarin.Tests.DotNetProjectTest.LibraryReferencingBindingLibrary(iOS): Failed: No missing files

Html Report (VSDrops) Download

Successes

✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 17 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 18 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Ventura (13): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: 5a9641eb2adda09897de237bda322ac845ee607e [PR build]

The previous Makefile change used $(wildcard) to conditionally pass
-debug-symbols to xcodebuild, but $(wildcard) in a recipe generated
by $(eval) is evaluated at Makefile parse time (before any targets are
built), so it never found the dSYMs.

Fix by using a shell-level 'test -d' check in the recipe instead, which
runs at recipe execution time when the dSYMs have already been built.

Also tolerate extra Relocations/ entries in dSYM bundles in the
LibraryReferencingBindingLibrary test, since dsymutil produces these
for fat (universal) binaries and the exact contents vary by architecture.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copy dSYMs from xcframeworks next to the app's dSYM

2 participants