Skip to content

Commit

Permalink
Enable Swift 6 language mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Supereg committed Sep 17, 2024
1 parent b8378b5 commit 73a3f84
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 54 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@ jobs:
scheme: SpeziDevices-Package
resultBundle: SpeziDevices-iOS.xcresult
artifactname: SpeziDevices-iOS.xcresult
packageios_latest:
name: Build and Test Swift Package iOS Latest
uses: StanfordSpezi/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
runsonlabels: '["macOS", "self-hosted"]'
scheme: SpeziDevices-Package
xcodeversion: latest
swiftVersion: 6
resultBundle: SpeziDevices-iOS-Latest.xcresult
artifactname: SpeziDevices-iOS-Latest.xcresult
ios:
name: Build and Test iOS
uses: StanfordSpezi/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
Expand All @@ -43,17 +33,6 @@ jobs:
scheme: TestApp
resultBundle: TestApp-iOS.xcresult
artifactname: TestApp-iOS.xcresult
ios_latest:
name: Build and Test iOS Latest
uses: StanfordSpezi/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
runsonlabels: '["macOS", "self-hosted"]'
path: 'Tests/UITests'
scheme: TestApp
xcodeversion: latest
swiftVersion: 6
resultBundle: TestApp-iOS-Latest.xcresult
artifactname: TestApp-iOS-Latest.xcresult
codeql:
name: CodeQL
uses: StanfordSpezi/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
Expand Down
29 changes: 1 addition & 28 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.9
// swift-tools-version:6.0

//
// This source file is part of the Stanford SpeziDevices open source project
Expand All @@ -12,13 +12,6 @@ import class Foundation.ProcessInfo
import PackageDescription


#if swift(<6)
let swiftConcurrency: SwiftSetting = .enableExperimentalFeature("StrictConcurrency")
#else
let swiftConcurrency: SwiftSetting = .enableUpcomingFeature("StrictConcurrency")
#endif


let package = Package(
name: "SpeziDevices",
defaultLocalization: "en",
Expand Down Expand Up @@ -51,10 +44,6 @@ let package = Package(
.product(name: "SpeziViews", package: "SpeziViews"),
.product(name: "Spezi", package: "Spezi")
],
swiftSettings: [
swiftConcurrency,
.enableUpcomingFeature("InferSendableFromCaptures")
],
plugins: [] + swiftLintPlugin()
),
.target(
Expand All @@ -68,10 +57,6 @@ let package = Package(
resources: [
.process("Resources")
],
swiftSettings: [
swiftConcurrency,
.enableUpcomingFeature("InferSendableFromCaptures")
],
plugins: [] + swiftLintPlugin()
),
.target(
Expand All @@ -84,10 +69,6 @@ let package = Package(
resources: [
.process("Resources")
],
swiftSettings: [
swiftConcurrency,
.enableUpcomingFeature("InferSendableFromCaptures")
],
plugins: [] + swiftLintPlugin()
),
.testTarget(
Expand All @@ -100,10 +81,6 @@ let package = Package(
.product(name: "SpeziBluetoothServices", package: "SpeziBluetooth"),
.product(name: "XCTestExtensions", package: "XCTestExtensions")
],
swiftSettings: [
swiftConcurrency,
.enableUpcomingFeature("InferSendableFromCaptures")
],
plugins: [] + swiftLintPlugin()
),
.testTarget(
Expand All @@ -114,10 +91,6 @@ let package = Package(
.product(name: "XCTByteCoding", package: "SpeziNetworking"),
.product(name: "XCTestExtensions", package: "XCTestExtensions")
],
swiftSettings: [
swiftConcurrency,
.enableUpcomingFeature("InferSendableFromCaptures")
],
plugins: [] + swiftLintPlugin()
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public struct MeasurementsRecordedSheet: View {

#if DEBUG
#Preview {
@State var isPresented = true
@State @Previewable var isPresented = true
return Text(verbatim: "")
.sheet(isPresented: $isPresented) {
MeasurementsRecordedSheet { samples in
Expand All @@ -196,7 +196,7 @@ public struct MeasurementsRecordedSheet: View {
}

#Preview {
@State var isPresented = true
@State @Previewable var isPresented = true
return Text(verbatim: "")
.sheet(isPresented: $isPresented) {
MeasurementsRecordedSheet { samples in
Expand All @@ -209,7 +209,7 @@ public struct MeasurementsRecordedSheet: View {
}

#Preview {
@State var isPresented = true
@State @Previewable var isPresented = true
return Text(verbatim: "")
.sheet(isPresented: $isPresented) {
MeasurementsRecordedSheet { samples in
Expand All @@ -222,7 +222,7 @@ public struct MeasurementsRecordedSheet: View {
}

#Preview {
@State var isPresented = true
@State @Previewable var isPresented = true
return Text(verbatim: "")
.sheet(isPresented: $isPresented) {
MeasurementsRecordedSheet { samples in
Expand All @@ -239,7 +239,7 @@ public struct MeasurementsRecordedSheet: View {
}

#Preview {
@State var isPresented = true
@State @Previewable var isPresented = true
return Text(verbatim: "")
.sheet(isPresented: $isPresented) {
MeasurementsRecordedSheet { samples in
Expand Down

0 comments on commit 73a3f84

Please sign in to comment.