Repository navigation
[publish] Copy dSYMs before disconnecting remote builds - #26905
rolfbjarne wants to merge 4 commits into
Conversation
Publish runs GetApplicationArtifacts, whose Build dependency disconnects the Pair-to-Mac session before returning. The subsequent session-aware dSYM copy therefore runs after the connection has closed. Mark Apple publishing in _PrePublish and invoke the existing copy target before BeforeDisconnect. Keep its existing Publish dependency for local builds; MSBuild executes it only once remotely, and the existing copy opt-out and app-bundle guards remain unchanged. Add a target-graph regression matrix covering Build and Publish, local and remote execution, and both CopyDSYMToPublishDirectory settings. Use the real publishing and messaging targets with stubbed remote task bodies to verify copying follows symbol generation and precedes disconnect, without requiring a Windows host or Apple workloads. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Append _CopyDSymToPublishDirectory to _PostProcessAppBundleDependsOn during _PrePublish, so symbols are copied after app post-processing and before the remote Build disconnects. This replaces the publishing flag and BeforeDisconnect wrapper while preserving ordinary Build behavior and the existing copy opt-out. Update the ordering regression matrix to use the real shared post-processing dependency list and target. All eight cases pass; removing the new dependency reproduces the remote Publish copy-after-disconnect failure while the other seven cases still pass. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Replace null-forgiving operators in the new target-graph test with explicit root validation and Single for the required dependency element. Invalid fixtures now fail explicitly without bypassing nullable checks, following repository review rules. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The ordering tests use stubbed tasks, leaving actual Windows Pair-to-Mac copying unverified.
0 open findings
What changed in this PR
Moves dSYM copying earlier in the Apple SDK publish pipeline so remote builds copy symbols before disconnecting.
Changes:
- Adds the copy target to publish-time app-bundle post-processing.
- Adds eight ordering test cases covering Build/Publish, local/remote, and copying enabled/disabled.
| File | Description |
|---|---|
| tests/dotnet/UnitTests/PostBuildTest.cs | Adds target-ordering and copy-count regression coverage. |
| dotnet/targets/Xamarin.Shared.Sdk.Publish.targets | Schedules dSYM copying before remote disconnection. |
🧠 Review effort: Balanced
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The publish-time post-processing dependency already copies dSYMs before the remote Build disconnects. Remove the old direct dependency from Publish so post-processing is the sole scheduling point, as requested in review. The eight target-ordering regression cases still pass, covering local and remote builds, publishing, and the copy opt-out. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
🔥 [CI Build #62ff35e] Test results 🔥Test results❌ Tests failed on VSTS: test results 1 tests crashed, 4 tests failed, 214 tests passed. Failures❌ dotnettests tests (macOS)1 tests failed, 0 tests passed.Failed tests
Html Report (VSDrops) Download ❌ monotouch tests (iOS)1 tests failed, 19 tests passed.Failed tests
Html Report (VSDrops) Download ❌ monotouch tests (macOS)2 tests failed, 18 tests passed.Failed tests
Html Report (VSDrops) Download ❌ windows tests🔥 Failed catastrophically on VSTS: test results - windows (no summary found). Html Report (VSDrops) Download Successes✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |

Remote publishing runs
BuildthroughGetApplicationArtifacts, which disconnects the Pair-to-Mac session before the final dSYM copy runs. That copy uses session-aware tasks and must execute while the connection is still active.Append
_CopyDSymToPublishDirectoryto_PostProcessAppBundleDependsOnin_PrePublish, so copying happens after symbol generation but before the remote build disconnects. Ordinary builds andCopyDSYMToPublishDirectory=falseretain their existing behavior. Keep the final Publish dependency as a fallback; MSBuild executes the copy target only once.The target-graph regression matrix covers Build/Publish, local/remote, and copying enabled/disabled. All eight cases pass. Removing the dependency reproduces the remote publish failure while the other seven cases still pass. This exercises the real target ordering with stubbed remote tasks, not an end-to-end Windows Pair-to-Mac build.
Related to #26847; this addresses the dSYM ordering problem separately from the application artifact metadata failure.
Note
AI/Copilot-generated. 🤖 Pull request created by Copilot