[msbuild] Add diagnostic logging for native reference resource resolution (#24564) - #26563
Conversation
…tion (#24564) Add low-importance diagnostic logging to help investigate #24564, where a Firebase.Crashlytics.resources.zip is not copied to the Mac during Pair-to-Mac builds: * ResolveNativeReferences.GetAdditionalItemsToBeCopied(): log which branch (resources directory vs resources zip vs neither) is taken for each reference, including the exact paths checked. * Xamarin.Shared.targets: log the ReferencePath and _ReferencesWithNativeReferencesToExpand item groups computed in _ExpandNativeReferences, to verify whether a given assembly (e.g. Firebase.Crashlytics.dll) is included. * CompareFilesMessageHandler (Mac-side messaging handler): trace whether each file is missing, has a mismatched hash, or already matches on the Mac, to help diagnose why a file may not get copied over. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
It introduces avoidable extra allocations in a build-path hot spot and the PR description currently claims additional file changes that are not present in the diff.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR adds extra diagnostic logging to help investigate Pair-to-Mac native-reference/resource copy behavior (notably around .resources directories / .resources.zip files and Mac-side file compare decisions).
Changes:
- Added low-importance MSBuild task logging in
ResolveNativeReferences.GetAdditionalItemsToBeCopied()to indicate whether a.resourcesdirectory or.resources.zipwas found (or neither). - Added Mac-side tracing in
CompareFilesMessageHandlerto report whether each file is missing, hash-mismatched, or already matches.
File summaries
| File | Description |
|---|---|
| msbuild/Xamarin.MacDev.Tasks/Tasks/ResolveNativeReferences.cs | Adds diagnostic messages for which resource package path is detected per reference. |
| msbuild/Messaging/Xamarin.Messaging.Build/Handlers/CompareFilesMessageHandler.cs | Adds per-item tracing for missing/mismatch/match outcomes during Mac-side compare. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 3
- Review effort level: Lite
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot Autofix powered by AI <175728472+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 |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #19fe49b] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 264 tests passed 🎉 Tests counts✅ 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 |
Add low-importance diagnostic logging to help investigate #24564, where a Firebase.Crashlytics.resources.zip is not copied to the Mac during Pair-to-Mac builds: