Skip to content

Commit 39589f5

Browse files
authored
Merge pull request #99 from swhitty/swift-6
Swift 6+
2 parents dbb4ef9 + 68d3a60 commit 39589f5

31 files changed

+37
-286
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

CommandLine/CommandLine.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
import Foundation
3333
import SwiftDraw
34+
import SwiftDrawDOM
3435

3536
extension SwiftDraw.CommandLine {
3637

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/DOM+Extensions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ extension DOM {
8484
// Equatable just for tests
8585

8686
extension DOM.GraphicsElement: Swift.Equatable {
87-
public static func ==(lhs: DOM.GraphicsElement, rhs: DOM.GraphicsElement) -> Bool {
87+
static func ==(lhs: DOM.GraphicsElement, rhs: DOM.GraphicsElement) -> Bool {
8888
let toString: (Any) -> String = { var text = ""; dump($0, to: &text); return text }
8989
return toString(lhs) == toString(rhs)
9090
}

DOM/Tests/Parser.XML.PathTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ private func arc(_ rx: Coordinate, _ ry: Coordinate, _ rotate: Coordinate,
272272

273273

274274
extension DOM.Path.Segment: Swift.Equatable {
275-
public static func ==(lhs: DOM.Path.Segment, rhs: DOM.Path.Segment) -> Bool {
275+
static func ==(lhs: DOM.Path.Segment, rhs: DOM.Path.Segment) -> Bool {
276276
let toString: (Any) -> String = { var text = ""; dump($0, to: &text); return text }
277277
return toString(lhs) == toString(rhs)
278278
}

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")

DOM/Tests/XML.Parser.ScannerTests.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
// 3. This notice may not be removed or altered from any source distribution.
3030
//
3131

32+
public import Foundation
3233
import XCTest
3334
@testable import SwiftDrawDOM
3435

@@ -234,9 +235,10 @@ private func AssertScanPercentageFloat(_ text: String, _ expected: Float?, file:
234235
XCTAssertEqual(try? scanner.scanPercentageFloat(), expected, file: file, line: line)
235236
}
236237

238+
extension CharacterSet: @retroactive ExpressibleByExtendedGraphemeClusterLiteral {}
239+
extension CharacterSet: @retroactive ExpressibleByUnicodeScalarLiteral {}
240+
extension CharacterSet: @retroactive ExpressibleByStringLiteral {
237241

238-
extension Foundation.CharacterSet: Swift.ExpressibleByStringLiteral {
239-
240242
static let hexadecimal: Foundation.CharacterSet = "0123456789ABCDEFabcdef"
241243

242244
public init(stringLiteral value: String) {

Package.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ extension Array where Element == SwiftSetting {
5858
static var upcomingFeatures: [SwiftSetting] {
5959
[
6060
.enableUpcomingFeature("ExistentialAny"),
61+
.enableUpcomingFeature("InternalImportsByDefault"),
62+
.enableUpcomingFeature("MemberImportVisibility"),
6163
.swiftLanguageMode(.v6)
6264
]
6365
}

[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
},

0 commit comments

Comments
 (0)