[release/10.0.1xx] [system-dependencies] Update the check for the Metal toolchain to update if an update is available.#24857
Conversation
…ate if an update is available. `xcodebuild -showComponent ...` can return this: > Status: installedUpdateAvailable which we understood to be "Installed", which is incorrect. So fix the detection to handle this scenario, and (re)install the toolchain in question.
There was a problem hiding this comment.
Pull request overview
Updates system-dependencies.sh to correctly treat Xcode component status installedUpdateAvailable as requiring an update (instead of considering it fully installed), so the Metal toolchain gets (re)downloaded when an update is available.
Changes:
- Detect
Status: installedUpdateAvailablefromxcodebuild -showComponentand treat it as needing an update. - Adjust provisioning/failure logic to either prompt the user or automatically re-download the component when
--provision-xcode-componentsis set. - Improve branching clarity by separating “needs install” vs “needs update” states.
You can also share your feedback on Copilot code review. Take the survey.
| if test -n "$NEEDS_UPDATE"; then | ||
| fail "The Xcode component ${COLOR_BLUE}$comp${COLOR_RESET} is installed, but an update is available. Execute ${COLOR_MAGENTA}xcrun xcodebuild -downloadComponent $comp${COLOR_RESET} or ${COLOR_MAGENTA}./system-dependencies.sh --provision-xcode-components${COLOR_RESET} to install." | ||
| else |
There was a problem hiding this comment.
The failure message for the installedUpdateAvailable case ends with "...to install." even though the component is already installed; this reads like a contradiction. Consider changing the wording to explicitly say "to update" or "to (re)install/update" so it’s clear the same command is being used to bring the component up to date.
✅ [CI Build #fcca9f6] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #fcca9f6] 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 #fcca9f6] Build passed (Build macOS tests) ✅Pipeline on Agent |
💻 [CI Build #fcca9f6] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #fcca9f6] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [CI Build #fcca9f6] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
💻 [CI Build #fcca9f6] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
🚀 [CI Build #fcca9f6] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 117 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
|
Test failure is unrelated (and fixed in #24866). |
xcodebuild -showComponent ...can return this:which we understood to be "Installed", which is incorrect.
So fix the detection to handle this scenario, and (re)install the toolchain in question.
Backport of #24854.