-
Notifications
You must be signed in to change notification settings - Fork 554
[msbuild] Pass the XamarinTask instance along when calling CompressionHelper.TryCompress. #24439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…nHelper.TryCompress. Pass the XamarinTask instance along when calling CompressionHelper.TryCompress, so that TryCompress can use the instance ExecuteAsync method on XamarinTask. This is required for a future change, where the instance XamarinTask.ExecuteAsync method will set the environment to use the current/correct version of Xcode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the compression/decompression helper methods to accept a XamarinTask instance instead of just a TaskLoggingHelper, enabling future changes where the task's ExecuteAsync method will set the correct Xcode environment. The refactoring is systematic and consistent across all affected files.
Key Changes:
- Modified
CompressionHelper.TryCompressandCompressionHelper.TryDecompressto acceptXamarinTask taskparameter instead ofTaskLoggingHelper log - Updated
XamarinTask.ExecuteAsyncto include an optionalCancellationTokenparameter - Updated all call sites across multiple task classes to pass the task instance (
this)
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| msbuild/Xamarin.MacDev.Tasks/Tasks/XamarinTask.cs | Added CancellationToken? parameter to the instance ExecuteAsync method to support cancellation in compression operations |
| msbuild/Xamarin.MacDev.Tasks/Decompress.cs | Updated TryCompress and TryDecompress methods to accept XamarinTask instead of TaskLoggingHelper, allowing access to the task's ExecuteAsync method; updated internal helper methods accordingly |
| msbuild/Xamarin.MacDev.Tasks/Tasks/Zip.cs | Updated call to CompressionHelper.TryCompress to pass this instead of Log |
| msbuild/Xamarin.MacDev.Tasks/Tasks/Unzip.cs | Updated call to CompressionHelper.TryDecompress to pass this instead of Log |
| msbuild/Xamarin.MacDev.Tasks/Tasks/ResolveNativeReferences.cs | Updated multiple calls to CompressionHelper.TryDecompress and TryResolveXCFramework to pass this instead of Log; updated TryResolveXCFramework signature to accept XamarinTask |
| msbuild/Xamarin.MacDev.Tasks/Tasks/CreateBindingResourcePackage.cs | Updated call to CompressionHelper.TryCompress to pass this instead of Log |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
✅ [CI Build #0b53660] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #0b53660] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ 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 #0b53660] Build passed (Build macOS tests) ✅Pipeline on Agent |
💻 [CI Build #0b53660] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build #0b53660] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #0b53660] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
💻 [CI Build #0b53660] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [CI Build #0b53660] Tests on macOS arm64 - Mac Tahoe (26) passed 💻✅ All tests on macOS arm64 - Mac Tahoe (26) passed. Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #0b53660] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 120 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
Pass the XamarinTask instance along when calling
CompressionHelper.TryCompress, so that TryCompress can use the instance
ExecuteAsync method on XamarinTask.
This is required for a future change, where the instance
XamarinTask.ExecuteAsync method will set the environment to use the
current/correct version of Xcode.