SwiftPackageIndex / SwiftPackageIndex-Server

The Swift Package Index is the place to find Swift packages!
https://swiftpackageindex.com
Apache License 2.0
527 stars 40 forks source link

visionOS builds failure (missing simulator or passing incorrect `-destination`) #3216

Closed jessesquires closed 1 month ago

jessesquires commented 1 month ago

It appears that the visionOS simulator / runtime is not installed on the build machines. Or, the build command is incorrect.

(I'm not sure if -destination generic/platform=xrOS is valid.)

Example builds from Foil:

Build command:

(This is for Xcode 15, but the results are the same for Xcode 16)

env DEVELOPER_DIR=/Applications/Xcode-15.4.0.app xcrun xcodebuild -IDEClonedSourcePackagesDirPathOverride=$workDir/.dependencies -skipMacroValidation -skipPackagePluginValidation -derivedDataPath $workDir/.derivedData build -scheme Foil -destination generic/platform=xrOS

Build logs:

Running build ...
env DEVELOPER_DIR=/Applications/Xcode-15.4.0.app xcrun xcodebuild -IDEClonedSourcePackagesDirPathOverride=$workDir/.dependencies -skipMacroValidation -skipPackagePluginValidation -derivedDataPath $workDir/.derivedData build -scheme Foil -destination generic/platform=xrOS
Command line invocation:
    /Applications/Xcode-15.4.0.app/Contents/Developer/usr/bin/xcodebuild -IDEClonedSourcePackagesDirPathOverride=/Users/admin/builder/spi-builder-workspace/.dependencies -skipMacroValidation -skipPackagePluginValidation -derivedDataPath /Users/admin/builder/spi-builder-workspace/.derivedData build -scheme Foil -destination generic/platform=xrOS
User defaults from command line:
    IDEClonedSourcePackagesDirPathOverride = /Users/admin/builder/spi-builder-workspace/.dependencies
    IDEDerivedDataPathOverride = /Users/admin/builder/spi-builder-workspace/.derivedData
    IDEPackageSupportUseBuiltinSCM = YES
2024-07-12 15:13:47.990 xcodebuild[522:2976] Writing error result bundle to /var/folders/fs/0w3t9t1d28xc3bj0tgb8hcrw0000gn/T/ResultBundle_2024-12-07_15-13-0047.xcresult
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
        { generic:1, platform:xrOS }

The package does successfully build for visionOS: https://github.com/jessesquires/Foil/actions/runs/9922682031/job/27412014695

finestructure commented 1 month ago

Hi @jessesquires , I'm confused - the builds you're linking to don't exist and the build details for Foil show visionOS as succeeded. Did you mean to link to another package? Or were you perhaps looking at outdated builds of a version that failed for another reason?

CleanShot 2024-07-14 at 09 58 36@2x

jessesquires commented 1 month ago

@finestructure oh hm.

I'm not sure how the site works, but I guess builds are ephemeral and only the most recent show up?

The page you screenshotted was definitely showing visionOS failures yesterday. I copied the logs above directly from the site. (You can see -scheme Foil in both.)

Anyway, it all looks correct now! 😊 Sorry for the noise.

finestructure commented 1 month ago

I'm not sure how the site works, but I guess builds are ephemeral and only the most recent show up?

Yes, we delete builds when new versions come in. I guess your links were to main branch builds which had updates.

Perhaps that version had some other build failure and it looked like a simulator setup issue because our build command doesn't select the sim on your machine? Anyway, glad to see it's working now :)

daveverwer commented 1 month ago

This made me go and double check I installed all the platform SDKs and simulators OK. We're good 👍

Screenshot 2024-07-15 at 08 33 02@2x