Repository navigation
[mtouch] Make mtouch work without Xcode, since we don't really need Xcode for what mtouch currently does. - #25430
Conversation
…code for what mtouch currently does. mtouch only needs to know the Xcode version to do what it currently does (create the partial static registrar code during our build), so just pass that instead of the path to Xcode.
There was a problem hiding this comment.
Pull request overview
This PR aims to let mtouch run its registrar-generation workflow without requiring an Xcode installation by passing the Xcode version (instead of an Xcode path) through the build.
Changes:
- Removed
ValidateXcodeinvocation frommtouchentrypoint to avoid requiring an installed Xcode. - Added a new
--xcode-versioncommand-line option and plumbed it through the mtouch build Makefile. - Added a partial fallback for Mac Catalyst macOS→iOS version mapping when Xcode isn’t configured.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| tools/mtouch/mtouch.cs | Stops validating/finding Xcode before running registrar generation. |
| tools/mtouch/Makefile | Passes --xcode-version $(XCODE_VERSION) to mtouch and adds a Linux-oriented no-xcode-build path. |
| tools/common/Driver.cs | Adds --xcode-version parsing and exposes a setter for Driver.XcodeVersion. |
| tools/common/Application.cs | Adds a warning+fallback path for Mac Catalyst version mapping when Xcode isn’t configured. |
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.
The hardcoded macOS dylib path does not exist on Linux. Using "libc" as the library name lets the .NET runtime resolve the correct native library on both macOS and Linux. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
- Wrap the no-Xcode Mac Catalyst fallback in #if LEGACY_TOOLS - Fix spelling: "a internal" → "an internal" - Use Version.TryParse with MX0026 error for --xcode-version parsing - Throw a clear MX0099 error from XcodeVersion getter when unset - Remove duplicate no-xcode-build prerequisite from Makefile Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
…r.cs These were using macOS-specific library paths (/usr/lib/libSystem.dylib) which do not exist on Linux. CoreResolver calls GetRealPath during registrar generation, so this breaks the no-xcode-build on Linux. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
✅ [PR Build #38dbf9c] Build passed (Detect API changes) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #38dbf9c] 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 |
✅ [PR Build #38dbf9c] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #38dbf9c] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 183 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. [attempt 2] Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
mtouch only needs to know the Xcode version to do what it currently does
(create the partial static registrar code during our build), so just pass that
instead of the path to Xcode.