Skip to content

Commit 9089b56

Browse files
committed
Swift 6.0+
1 parent dbb4ef9 commit 9089b56

File tree

11 files changed

+6
-267
lines changed

11 files changed

+6
-267
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Test
4242
run: swift test --skip-build
4343

44-
xcode_16_2:
44+
xcode_16_3:
4545
runs-on: macos-15
4646
env:
4747
DEVELOPER_DIR: /Applications/Xcode_16.2.app/Contents/Developer
@@ -55,32 +55,6 @@ jobs:
5555
- name: Test
5656
run: swift test --skip-build
5757

58-
xcode_15_4:
59-
runs-on: macos-14
60-
env:
61-
DEVELOPER_DIR: /Applications/Xcode_15.3.app/Contents/Developer
62-
steps:
63-
- name: Checkout
64-
uses: actions/checkout@v4
65-
- name: Version
66-
run: swift --version
67-
- name: Build
68-
run: swift build --build-tests
69-
- name: Test
70-
run: swift test --skip-build
71-
72-
linux_5_10:
73-
runs-on: ubuntu-latest
74-
container: swift:5.10
75-
steps:
76-
- name: Checkout
77-
uses: actions/checkout@v4
78-
- name: Version
79-
run: swift --version
80-
- name: Build
81-
run: swift build --build-tests
82-
- name: Test
83-
run: swift test --skip-build
8458

8559
linux_6:
8660
runs-on: ubuntu-latest

DOM/Sources/TextOutputStream+StandardError.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,8 @@ package extension TextOutputStream where Self == StandardErrorStream {
4444

4545
package struct StandardErrorStream: TextOutputStream {
4646

47-
#if compiler(<6.0)
48-
fileprivate static var shared = StandardErrorStream()
49-
#else
5047
nonisolated(unsafe)
5148
fileprivate static var shared = StandardErrorStream()
52-
#endif
5349

5450
package func write(_ string: String) {
5551
if #available(macOS 10.15.4, iOS 13.4, tvOS 13.4, watchOS 6.2, *) {

DOM/Tests/ValueParserTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ final class ValueParserTests: XCTestCase {
126126
}
127127

128128
func testUrl() {
129-
#if compiler(>=5.9) && canImport(Darwin)
129+
#if canImport(Darwin)
130130
XCTAssertEqual(try parser.parseUrl("#testing🐟").fragmentID, "testing🐟")
131131
#else
132132
XCTAssertEqual(try parser.parseUrl("#testing").fragmentID, "testing")

Package.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ extension Array where Element == SwiftSetting {
5757

5858
static var upcomingFeatures: [SwiftSetting] {
5959
[
60+
.enableUpcomingFeature("ExistentialAny"),
6061
.enableUpcomingFeature("ExistentialAny"),
6162
.swiftLanguageMode(.v6)
6263
]

[email protected]

Lines changed: 0 additions & 63 deletions
This file was deleted.

SwiftDraw.podspec.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"exclude_files": "SwiftDraw/Sources/NSImage+Image.swift",
4141
"frameworks": ["UIKit", "Foundation"]
4242
},
43-
"swift_version": "5.10",
43+
"swift_version": "6.0",
4444
"pod_target_xcconfig": {
4545
"OTHER_SWIFT_FLAGS": "-package-name SwiftDraw"
4646
},

SwiftDraw/Sources/Renderer/Renderer.CoreGraphics.swift

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,6 @@ struct CGTransformingPattern: Hashable {
7070
let renderer = CGRenderer(context: ctx)
7171
renderer.perform(contents)
7272
}
73-
74-
#if compiler(<6.0)
75-
func hash(into hasher: inout Hasher) {
76-
bounds.origin.x.hash(into: &hasher)
77-
bounds.origin.y.hash(into: &hasher)
78-
bounds.size.width.hash(into: &hasher)
79-
bounds.size.height.hash(into: &hasher)
80-
contents.hash(into: &hasher)
81-
}
82-
83-
static func == (lhs: CGTransformingPattern, rhs: CGTransformingPattern) -> Bool {
84-
lhs.bounds == rhs.bounds && lhs.contents == rhs.contents
85-
}
86-
#endif
8773
}
8874

8975
struct CGProvider: RendererTypeProvider {

SwiftDraw/Sources/SVG/SVG+Hashable.swift

Lines changed: 0 additions & 149 deletions
This file was deleted.

SwiftDraw/Sources/SVG/SVG.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import SwiftDrawDOM
3333
import Foundation
3434

3535
#if compiler(<6.0)
36-
#warning("SwiftDraw will soon remove support for Swift 5.10")
36+
#warning("SwiftDraw will soon remove support for Swift 6.0")
3737
#endif
3838

3939
#if canImport(CoreGraphics)

SwiftDraw/Sources/UIImage+SVG.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,17 +146,11 @@ extension SVG {
146146

147147
private extension MainActor {
148148

149-
#if compiler(<6.0)
150-
nonisolated static func syncIsolated<T>(operation: () -> T) -> T {
151-
operation()
152-
}
153-
#else
154149
static func syncIsolated<T: Sendable>(operation: @MainActor () -> T) -> T {
155150
if Thread.isMainThread {
156151
return MainActor.assumeIsolated { operation() }
157152
} else {
158153
return DispatchQueue.main.sync { operation() }
159154
}
160155
}
161-
#endif
162156
}

0 commit comments

Comments
 (0)