tuist / tuist

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

Tuist 4.x.x fails to generate cache #5930

Closed dogo closed 6 months ago

dogo commented 6 months ago

What happened?

After migrating to Tuist 4.x.x, the cache command failed because I didn't have the tvOS SDK installed. Using the 3.x.x releases the cache build fine.

Command : tuist cache

How do we reproduce it?

Could be reproduced using my pet project https://github.com/dogo/swdestiny-trades

Error log

The 'xcodebuild' command exited with error code 70 and message:
2024-02-14 09:01:13.855 xcodebuild[85855:2057628] Writing error result bundle to /var/folders/ms/vbc2wttj1sd2wysk01dm85pr0000gn/T/ResultBundle_2024-14-02_09-01-0013.xcresult
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
        { generic:1, platform:tvOS Simulator }

    Available destinations for the "Binaries-Cache-tvOS" scheme:
        { platform:macOS, arch:x86_64, id:6FC42174-C124-5C56-B298-9C372AB1AC99 }
        { platform:macOS, arch:x86_64, variant:Mac Catalyst, id:6FC42174-C124-5C56-B298-9C372AB1AC99 }
        { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
        { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
        { platform:macOS, name:Any Mac }
        { platform:macOS, variant:Mac Catalyst, name:Any Mac }
        { platform:iOS Simulator, id:51AF292D-C207-4EE9-93AB-5A3E5FCC1E60, OS:17.2, name:iPad (10th generation) }
        { platform:iOS Simulator, id:068535D4-8990-4D83-9BEF-53A660ED4825, OS:17.2, name:iPad Air (5th generation) }
        { platform:iOS Simulator, id:ECD6ADE1-CBDC-438D-AE57-281D454D81E7, OS:17.2, name:iPad Pro (11-inch) (4th generation) }
        { platform:iOS Simulator, id:11FE201F-8344-4D53-A116-CE2801E33939, OS:17.2, name:iPad Pro (12.9-inch) (6th generation) }
        { platform:iOS Simulator, id:4202E4E7-CB0C-4610-8908-69BAECC2933B, OS:17.2, name:iPad mini (6th generation) }
        { platform:iOS Simulator, id:356BC02B-29F6-4D93-B2F3-6D77CE8F5B7A, OS:17.2, name:iPhone 15 }
        { platform:iOS Simulator, id:11FEE6B6-07C5-48D1-A17B-633FABA3E62F, OS:17.2, name:iPhone 15 Plus }
        { platform:iOS Simulator, id:4F8C9894-8FE6-43F5-B31B-750B60F61F46, OS:17.2, name:iPhone 15 Pro }
        { platform:iOS Simulator, id:8C0879F2-2CB6-44DF-9425-C824EC5DB9A4, OS:17.2, name:iPhone 15 Pro Max }
        { platform:iOS Simulator, id:9837D144-FBAC-4290-9D97-F728C9E3ADFA, OS:17.2, name:iPhone SE (3rd generation) }

    Ineligible destinations for the "Binaries-Cache-tvOS" scheme:
        { platform:tvOS, id:dvtdevice-DVTiOSDevicePlaceholder-appletvos:placeholder, name:Any tvOS Device, error:tvOS 17.2 is not installed. To use with Xcode, first download and install the platform }

Consider creating an issue using the following link: https://github.com/tuist/tuist/issues/new/choose

macOS version

14.3

Tuist version

4.1.2

Xcode version

15.2.0

fortmarek commented 6 months ago

Thanks for reporting this with a reproducer! This helped us a lot in fixing this, you can find the PR here: https://github.com/tuist/tuist/pull/5931

cc @anlaital-oura, this is probably the same issue you were running in your project.

dogo commented 6 months ago

Thanks @fortmarek .

FYI

100 of 100 [------------------------------] ETA: 00:00:00 (at 59.42) it/s) 33 target(s) stored: DGCharts, FBLPromises, FTPopOverMenu, Firebase, FirebaseAnalyticsTarget, FirebaseAnalyticsWrapper, FirebaseCore, FirebaseCoreExtension, FirebaseCoreInternal, FirebaseCrashlytics, FirebaseInstallations, FirebaseSessions, FirebaseSessionsObjC, GoogleAppMeasurementTarget, GoogleDataTransport, GoogleUtilities-AppDelegateSwizzler, GoogleUtilities-Environment, GoogleUtilities-Logger, GoogleUtilities-MethodSwizzler, GoogleUtilities-NSData, GoogleUtilities-Network, GoogleUtilities-Reachability, GoogleUtilities-UserDefaults, ImageSlideshow, Kingfisher, PKHUD, PKHUD_PKHUD, Promises, SketchKit, SwiftMessages, iOSSnapshotTestCaseCore, nanopb, third-party-IsAppEncrypted

All cacheable targets have been cached successfully as xcframeworks