[msbuild] Automatically set DEVELOPER_DIR for all child processes.#24541
[msbuild] Automatically set DEVELOPER_DIR for all child processes.#24541rolfbjarne merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request refactors the MSBuild task system to automatically set the DEVELOPER_DIR environment variable for all child processes. Instead of requiring each task to explicitly pass the SDK developer path when executing external tools, the functionality is now centralized in the XamarinTask base class.
Changes:
- Modified
XamarinTask.ExecuteAsyncto automatically use theSdkDevPathproperty when calling external processes - Removed explicit
sdkDevPathparameters from all taskExecuteAsynccalls across 24 task files - Changed the static
ExecuteAsyncmethod visibility frominternal protectedto private, improving encapsulation
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| msbuild/Xamarin.MacDev.Tasks/Tasks/XamarinTask.cs | Core implementation - instance method now automatically passes SdkDevPath to static method; static method visibility reduced to private |
| msbuild/Xamarin.MacDev.Tasks/Tasks/XcodeCompilerToolTask.cs | Removed manual DEVELOPER_DIR environment setup and sdkDevPath parameter from ExecuteAsync call |
| msbuild/Xamarin.MacDev.Tasks/Tasks/XcodeBuildTask.cs | Removed sdkDevPath parameter from xcrun execution |
| msbuild/Xamarin.MacDev.Tasks/Tasks/SpotlightIndexer.cs | Switched from static to instance ExecuteAsync method call |
| msbuild/Xamarin.MacDev.Tasks/Tasks/ScnTool.cs | Removed sdkDevPath parameter from xcrun execution |
| msbuild/Xamarin.MacDev.Tasks/Tasks/OptimizePropertyList.cs | Switched from static to instance ExecuteAsync method call |
| msbuild/Xamarin.MacDev.Tasks/Tasks/OptimizeImage.cs | Switched from static to instance ExecuteAsync method call and removed sdkDevPath parameter |
| msbuild/Xamarin.MacDev.Tasks/Tasks/MetalLib.cs | Switched from static to instance ExecuteAsync method call |
| msbuild/Xamarin.MacDev.Tasks/Tasks/Metal.cs | Switched from static to instance ExecuteAsync method call |
| msbuild/Xamarin.MacDev.Tasks/Tasks/MergeAppBundles.cs | Removed sdkDevPath parameter from lipo execution |
| msbuild/Xamarin.MacDev.Tasks/Tasks/LinkNativeCode.cs | Removed sdkDevPath parameter from xcrun executions |
| msbuild/Xamarin.MacDev.Tasks/Tasks/InstallNameTool.cs | Removed sdkDevPath parameter from xcrun execution |
| msbuild/Xamarin.MacDev.Tasks/Tasks/GetMlaunchArguments.cs | Removed sdkDevPath parameter from mlaunch executions |
| msbuild/Xamarin.MacDev.Tasks/Tasks/Ditto.cs | Switched from static to instance ExecuteAsync method call |
| msbuild/Xamarin.MacDev.Tasks/Tasks/DSymUtil.cs | Removed sdkDevPath parameter from xcrun execution |
| msbuild/Xamarin.MacDev.Tasks/Tasks/CreateInstallerPackage.cs | Switched from static to instance ExecuteAsync method call |
| msbuild/Xamarin.MacDev.Tasks/Tasks/CreateAssetPack.cs | Switched from static to instance ExecuteAsync method call |
| msbuild/Xamarin.MacDev.Tasks/Tasks/CoreMLCompiler.cs | Removed sdkDevPath parameter from coremlc execution |
| msbuild/Xamarin.MacDev.Tasks/Tasks/CompileSceneKitAssets.cs | Removed sdkDevPath parameter and unnecessary blank line |
| msbuild/Xamarin.MacDev.Tasks/Tasks/CompileNativeCode.cs | Removed sdkDevPath parameter from xcrun execution |
| msbuild/Xamarin.MacDev.Tasks/Tasks/Codesign.cs | Removed null sdkDevPath parameter from codesign execution |
| msbuild/Xamarin.MacDev.Tasks/Tasks/BGen.cs | Switched from static to instance ExecuteAsync method call |
| msbuild/Xamarin.MacDev.Tasks/Tasks/AlTool.cs | Switched from static to instance ExecuteAsync method call and removed sdkDevPath parameter |
| msbuild/Xamarin.MacDev.Tasks/Tasks/AOTCompile.cs | Removed sdkDevPath parameter from AOT compiler execution |
✅ [PR Build #5269892] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ [CI Build #5269892] Build passed (Build packages) ✅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 #5269892] Build passed (Build macOS tests) ✅Pipeline on Agent |
💻 [CI Build #5269892] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build #5269892] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #5269892] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [CI Build #5269892] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
💻 [CI Build #5269892] 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 #5269892] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 122 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
At least for all tasks that sets the SdkDevPath (a future pull request will
ensure that all tasks set SdkDevPath).