tuist / tuist

Tuist's CLI
https://tuist.io
MIT License
4.54k stars 547 forks source link

"tuist test" can no longer find suitable device for older simulator versions #5589

Closed regularberry closed 10 months ago

regularberry commented 10 months ago

What happened?

Using Xcode 14.3.1, we specify the os version when we run tests using tuist test --os 16.4.

After updating Tuist to 3.31.2, it says it can't find a suitable device for iOS 16.4, even though some appear in the subsequent list.

I believe this was caused by a recent change to filter devices by the maxRuntimeVersion: https://github.com/tuist/tuist/pull/5487/files#diff-8e7d1445085e4dae6fd2212f28908def599223feb351fac6ad55a7f87ff1ee1bR156

I'm guessing the easy fix is to not filter by maxRuntimeVersion if version is specified.

How do we reproduce it?

Use the attached sample project and run tuist test App --os 16.4 app_with_tests_older_sim.zip

Error log

Could not find a suitable device for iOS 16.4.0. Did find Apple TV (tvOS 16.1), Apple TV 4K (3rd generation) (tvOS 16.1), Apple TV 4K (3rd generation) (at 1080p) (tvOS 16.1), iPhone SE (3rd generation) (iOS 17.2), iPhone 14 (iOS 17.2), iPhone 14 Plus (iOS 17.2), iPhone 14 Pro (iOS 17.2), iPhone 14 Pro Max (iOS 17.2), iPad Air (5th generation) (iOS 17.2), iPad (10th generation) (iOS 17.2), iPad mini (6th generation) (iOS 17.2), iPad Pro (11-inch) (4th generation) (iOS 17.2), iPad Pro (12.9-inch) (6th generation) (iOS 17.2), iPhone 15 (iOS 17.2), iPhone 15 Plus (iOS 17.2), iPhone 15 Pro (iOS 17.2), iPhone 15 Pro Max (iOS 17.2), Apple Watch Series 5 (40mm) (watchOS 9.4), Apple Watch Series 5 (44mm) (watchOS 9.4), Apple Watch Series 6 (40mm) (watchOS 9.4), Apple Watch Series 6 (44mm) (watchOS 9.4), Apple Watch Series 7 (41mm) (watchOS 9.4), Apple Watch Series 7 (45mm) (watchOS 9.4), Apple Watch SE (40mm) (2nd generation) (watchOS 9.4), Apple Watch SE (44mm) (2nd generation) (watchOS 9.4), Apple Watch Series 8 (41mm) (watchOS 9.4), Apple Watch Series 8 (45mm) (watchOS 9.4), Apple Watch Ultra (49mm) (watchOS 9.4), iPhone SE (3rd generation) (iOS 17.0), iPhone 14 (iOS 17.0), iPhone 14 Plus (iOS 17.0), iPhone 14 Pro (iOS 17.0), iPhone 14 Pro Max (iOS 17.0), iPad Air (5th generation) (iOS 17.0), iPad (10th generation) (iOS 17.0), iPad mini (6th generation) (iOS 17.0), iPad Pro (11-inch) (4th generation) (iOS 17.0), iPad Pro (12.9-inch) (6th generation) (iOS 17.0), iPhone 15 (iOS 17.0), iPhone 15 Plus (iOS 17.0), iPhone 15 Pro (iOS 17.0), iPhone 15 Pro Max (iOS 17.0), iPhone SE (3rd generation) (iOS 16.4), iPhone 14 (iOS 16.4), iPhone 14 Plus (iOS 16.4), iPhone 14 Pro (iOS 16.4), iPhone 14 Pro Max (iOS 16.4), iPad Air (5th generation) (iOS 16.4), iPad (10th generation) (iOS 16.4), iPad mini (6th generation) (iOS 16.4), iPad Pro (11-inch) (4th generation) (iOS 16.4), iPad Pro (12.9-inch) (6th generation) (iOS 16.4), Apple Vision Pro (visionOS 1.0), Apple Watch Series 5 (40mm) (watchOS 9.1), Apple Watch Series 5 (44mm) (watchOS 9.1), Apple Watch Series 6 (40mm) (watchOS 9.1), Apple Watch Series 6 (44mm) (watchOS 9.1), Apple Watch Series 7 (41mm) (watchOS 9.1), Apple Watch Series 7 (45mm) (watchOS 9.1), Apple Watch SE (40mm) (2nd generation) (watchOS 9.1), Apple Watch SE (40mm) (2nd generation) (watchOS 9.1), Apple Watch Series 8 (41mm) (watchOS 9.1), Apple Watch Series 8 (45mm) (watchOS 9.1), Apple Watch Ultra (49mm) (watchOS 9.1)

macOS version

13.6

Tuist version

3.31.2

Xcode version

14.3.1

fortmarek commented 10 months ago

I'm guessing the easy fix is to not filter by maxRuntimeVersion if version is specified.

That makes sense to me πŸ‘ Would you want to go ahead and give this a shot? πŸ™‚

regularberry commented 10 months ago

Yes!

regularberry commented 10 months ago

done! https://github.com/tuist/tuist/pull/5596