Skip to content

Commit 836dffc

Browse files
authored
Update dependencies and minimum Swift version to 5.7 (#23)
1 parent ff3c159 commit 836dffc

File tree

5 files changed

+101
-158
lines changed

5 files changed

+101
-158
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,16 @@ jobs:
2727
- tvOS
2828
- watchOS
2929
swift:
30-
- 5.5
31-
- 5.6
3230
- 5.7
3331
- 5.8
32+
- 5.9
3433
include:
35-
- swift: 5.5
36-
os: macos-12
37-
- swift: 5.6
38-
os: macos-12
3934
- swift: 5.7
4035
os: macos-13
4136
- swift: 5.8
4237
os: macos-13
38+
- swift: 5.9
39+
os: macos-13
4340
- action: test
4441
- platform: tvOS
4542
action: build

Package.resolved

Lines changed: 47 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
// swift-tools-version:5.5
2-
// The swift-tools-version declares the minimum version of Swift required to build this package.
1+
// swift-tools-version:5.7
32

43
import PackageDescription
54

65
let package = Package(
76
name: "TextBuilder",
87
platforms: [
98
.iOS(.v13),
10-
.macOS(.v10_15),
119
.tvOS(.v13),
10+
.macOS(.v10_15),
1211
.watchOS(.v6),
1312
],
1413
products: [
@@ -34,6 +33,6 @@ let package = Package(
3433

3534
package.dependencies = [
3635
.package(url: "https://github.com/google/swift-benchmark", from: "0.1.2"),
37-
.package(url: "https://github.com/davdroman/swift-builders", from: "0.2.0"),
38-
.package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "0.5.0"),
36+
.package(url: "https://github.com/davdroman/swift-builders", from: "0.5.0"),
37+
.package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "1.0.0"),
3938
]

Sources/TextBuilder/TextBuilder.swift

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import SwiftUI
1919
/// Text("amet, consectetur")
2020
/// }
2121
///
22-
#if compiler(>=5.7)
2322
@resultBuilder
2423
public struct TextBuilderWith<Separator: TextBuilderSeparator> {
2524
@inlinable
@@ -80,51 +79,3 @@ public struct TextBuilderWith<Separator: TextBuilderSeparator> {
8079
component ?? .empty
8180
}
8281
}
83-
#else
84-
@resultBuilder
85-
public struct TextBuilderWith<Separator: TextBuilderSeparator> {
86-
@inlinable
87-
public static func buildArray(_ texts: [[Text]]) -> [Text] {
88-
texts.flatMap { $0 }
89-
}
90-
91-
@inlinable
92-
public static func buildBlock(_ texts: [Text]...) -> [Text] {
93-
texts.flatMap { $0 }
94-
}
95-
96-
@inlinable
97-
public static func buildEither(first texts: [Text]) -> [Text] {
98-
texts
99-
}
100-
101-
@inlinable
102-
public static func buildEither(second texts: [Text]) -> [Text] {
103-
texts
104-
}
105-
106-
@inlinable
107-
public static func buildExpression<S: StringProtocol>(_ string: S) -> [Text] {
108-
[Text(string)]
109-
}
110-
111-
@inlinable
112-
public static func buildExpression(_ text: Text) -> [Text] {
113-
[text]
114-
}
115-
116-
@inlinable
117-
public static func buildLimitedAvailability(_ texts: [Text]) -> [Text] {
118-
texts
119-
}
120-
121-
@inlinable
122-
public static func buildOptional(_ texts: [Text]?) -> [Text] {
123-
texts ?? []
124-
}
125-
126-
public static func buildFinalResult(_ texts: [Text]) -> Text {
127-
texts.joined(separator: Separator.separator.map(Text.init)) ?? .empty
128-
}
129-
}
130-
#endif

TextBuilder.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 47 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)