-
-
Notifications
You must be signed in to change notification settings - Fork 601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add visionOS support #1098
Add visionOS support #1098
Changes from 19 commits
4c69024
0f901d9
d3eebfd
8663e72
a594e61
f0fb4c4
3720617
78b4e76
b86604f
a8d72dd
00d6003
5cf19ca
3ff34fc
9ed8094
1972142
c08b060
eaac8f4
11c9bc7
9eaf3be
6eb5881
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change to SPM version 2 should be fine, but up for discussion if we want to have it. Version 2 is available since Swift 5.6 with Xcode 13. I did a test opening the project with Xcode 14, and it worked without problems. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
{ | ||
"object": { | ||
"pins": [ | ||
{ | ||
"package": "CwlCatchException", | ||
"repositoryURL": "https://github.com/mattgallagher/CwlCatchException.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "f809deb30dc5c9d9b78c872e553261a61177721a", | ||
"version": "2.0.0" | ||
} | ||
}, | ||
{ | ||
"package": "CwlPreconditionTesting", | ||
"repositoryURL": "https://github.com/mattgallagher/CwlPreconditionTesting.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "c21f7bab5ca8eee0a9998bbd17ca1d0eb45d4688", | ||
"version": "2.1.0" | ||
} | ||
"pins" : [ | ||
{ | ||
"identity" : "cwlcatchexception", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/mattgallagher/CwlCatchException.git", | ||
"state" : { | ||
"revision" : "3b123999de19bf04905bc1dfdb76f817b0f2cc00", | ||
"version" : "2.1.2" | ||
} | ||
] | ||
}, | ||
"version": 1 | ||
}, | ||
{ | ||
"identity" : "cwlpreconditiontesting", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/mattgallagher/CwlPreconditionTesting.git", | ||
"state" : { | ||
"revision" : "dc9af4781f2afdd1e68e90f80b8603be73ea7abc", | ||
"version" : "2.2.0" | ||
} | ||
} | ||
], | ||
"version" : 2 | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// swift-tools-version:5.9 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file was added to not break support for older Swift versions. See details about this here: https://www.polpiella.dev/version-specific-package-manifests |
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "Nimble", | ||
platforms: [ | ||
.macOS(.v10_15), .iOS(.v13), .tvOS(.v13), .watchOS(.v6), .visionOS(.v1) | ||
], | ||
products: [ | ||
.library( | ||
name: "Nimble", | ||
targets: { | ||
var targets: [String] = ["Nimble"] | ||
#if os(macOS) | ||
targets.append("NimbleObjectiveC") | ||
#endif | ||
return targets | ||
}() | ||
), | ||
], | ||
dependencies: [ | ||
.package(url: "https://github.com/mattgallagher/CwlPreconditionTesting.git", .upToNextMajor(from: "2.2.0")), | ||
], | ||
targets: { | ||
var testHelperDependencies: [PackageDescription.Target.Dependency] = ["Nimble"] | ||
#if os(macOS) | ||
testHelperDependencies.append("NimbleObjectiveC") | ||
#endif | ||
var targets: [Target] = [ | ||
.target( | ||
name: "Nimble", | ||
dependencies: [ | ||
.product(name: "CwlPreconditionTesting", package: "CwlPreconditionTesting", | ||
condition: .when(platforms: [.macOS, .iOS, .macCatalyst, .visionOS])), | ||
.product(name: "CwlPosixPreconditionTesting", package: "CwlPreconditionTesting", | ||
condition: .when(platforms: [.tvOS, .watchOS])) | ||
], | ||
exclude: ["Info.plist"] | ||
), | ||
.target( | ||
name: "NimbleSharedTestHelpers", | ||
dependencies: testHelperDependencies | ||
), | ||
.testTarget( | ||
name: "NimbleTests", | ||
dependencies: ["Nimble", "NimbleSharedTestHelpers"], | ||
exclude: ["Info.plist"] | ||
), | ||
] | ||
#if os(macOS) | ||
targets.append(contentsOf: [ | ||
.target( | ||
name: "NimbleObjectiveC", | ||
dependencies: ["Nimble"] | ||
), | ||
.testTarget( | ||
name: "NimbleObjectiveCTests", | ||
dependencies: ["NimbleObjectiveC", "Nimble", "NimbleSharedTestHelpers"] | ||
) | ||
]) | ||
#endif | ||
return targets | ||
}(), | ||
swiftLanguageVersions: [.v5] | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Github actions doesn't yet support 15.2 - actions/runner-images#9169
We'll see this test failing until that's merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it is mentioned here 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh. Well, excellent. Guess the thread I found was already out of date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, this is annoying. Is the Vision Pro simulator not created by default? https://github.com/Quick/Nimble/actions/runs/7554289300/job/20585517470?pr=1098
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like it 😞
6eb5881 I reverted it to unblock this PR. Will keep an eye on the GH runner images and add it once it changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just found this issue (which is basically what you linked) where they point out that the version of Xcode 15.2 is the beta 2 and not the final version. I guess it should be fine once they use the stable version of 15.2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll watch that thread and update our CI once a new build is out.