Skip to content

Fix SDK->simruntime mapping assumptions in test runners#2889

Merged
aaronsky merged 7 commits intobazelbuild:mainfrom
aaronsky:aaronsky/fix-sdk-runtime-mapping-assumption-in-ios-test-runner
Mar 10, 2026
Merged

Fix SDK->simruntime mapping assumptions in test runners#2889
aaronsky merged 7 commits intobazelbuild:mainfrom
aaronsky:aaronsky/fix-sdk-runtime-mapping-assumption-in-ios-test-runner

Conversation

@aaronsky
Copy link
Contributor

@aaronsky aaronsky commented Mar 7, 2026

Redux of #2675.

Refactors simulator_creator.py to discover a recent simruntime when none is explicitly declared, and removes the SDK version fallback from the test runner rule implementations. This assumption is problematic in recent times whenever Apple pushes a new simruntime OTA for an existing Xcode, or when the simruntime identifier does not align with the simruntime version and consequently the SDK version (such as OS patch releases).

aaronsky added 3 commits March 7, 2026 06:32
Signed-off-by: Aaron Sky <asky@dropbox.com>
Signed-off-by: Aaron Sky <asky@dropbox.com>
Signed-off-by: Aaron Sky <asky@dropbox.com>
@aaronsky aaronsky marked this pull request as ready for review March 7, 2026 22:46
aaronsky added 2 commits March 9, 2026 21:31
Signed-off-by: Aaron Sky <asky@dropbox.com>
Signed-off-by: Aaron Sky <asky@dropbox.com>
Copy link
Contributor

@adincebic adincebic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good at first glance. Are identifier and version enough to match the runtime or do we have to take platform into account as well? Perhaps identifier is enough?

@aaronsky
Copy link
Contributor Author

The runtime identifier is in the format com.apple.CoreSimulator.SimRuntime.iOS-26-3 and should be enough. SDK version and OS version should be okay given an assumption (or eventual parameterization) of a platform. So much of the test runner logic assumes iOS, which I would like to fix in a subsequent PR.

The only thing I'm not sure about is whether falling back on runtime-match is sufficient – for example, I bet if you downloaded Xcode 26.3 and the iOS 26.3 simruntime now, your runtime-match would be incorrect. However, in the case of CI's setup, that's clearly enough. 🤷 Maybe I should still incorporate a basic "does the SDK version match the runtime version" check into the loop?

This also doesn't resolve the issues in this area with actool et al, which still assume the SDK and simruntime (which actool leverages) are the same.

Copy link
Contributor

@luispadron luispadron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@aaronsky aaronsky enabled auto-merge (squash) March 10, 2026 15:53
@aaronsky aaronsky merged commit d6fd5b5 into bazelbuild:main Mar 10, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants