Skip to content

Commit

Permalink
Update dependencies and minimum Swift version to 5.7 (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
davdroman authored Sep 13, 2023
1 parent ff3c159 commit 836dffc
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 158 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,16 @@ jobs:
- tvOS
- watchOS
swift:
- 5.5
- 5.6
- 5.7
- 5.8
- 5.9
include:
- swift: 5.5
os: macos-12
- swift: 5.6
os: macos-12
- swift: 5.7
os: macos-13
- swift: 5.8
os: macos-13
- swift: 5.9
os: macos-13
- action: test
- platform: tvOS
action: build
Expand Down
96 changes: 47 additions & 49 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,52 +1,50 @@
{
"object": {
"pins": [
{
"package": "swift-argument-parser",
"repositoryURL": "https://github.com/apple/swift-argument-parser",
"state": {
"branch": null,
"revision": "fee6933f37fde9a5e12a1e4aeaa93fe60116ff2a",
"version": "1.2.2"
}
},
{
"package": "Benchmark",
"repositoryURL": "https://github.com/google/swift-benchmark",
"state": {
"branch": null,
"revision": "8163295f6fe82356b0bcf8e1ab991645de17d096",
"version": "0.1.2"
}
},
{
"package": "swift-builders",
"repositoryURL": "https://github.com/davdroman/swift-builders",
"state": {
"branch": null,
"revision": "a8fd97e32b7bb65f3fc1bd7d72725155fb2b4d77",
"version": "0.4.0"
}
},
{
"package": "swift-custom-dump",
"repositoryURL": "https://github.com/pointfreeco/swift-custom-dump",
"state": {
"branch": null,
"revision": "de8ba65649e7ee317b9daf27dd5eebf34bd4be57",
"version": "0.9.1"
}
},
{
"package": "xctest-dynamic-overlay",
"repositoryURL": "https://github.com/pointfreeco/xctest-dynamic-overlay",
"state": {
"branch": null,
"revision": "ab8c9f45843694dd16be4297e6d44c0634fd9913",
"version": "0.8.4"
}
"pins" : [
{
"identity" : "swift-argument-parser",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser",
"state" : {
"revision" : "fee6933f37fde9a5e12a1e4aeaa93fe60116ff2a",
"version" : "1.2.2"
}
]
},
"version": 1
},
{
"identity" : "swift-benchmark",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/swift-benchmark",
"state" : {
"revision" : "8163295f6fe82356b0bcf8e1ab991645de17d096",
"version" : "0.1.2"
}
},
{
"identity" : "swift-builders",
"kind" : "remoteSourceControl",
"location" : "https://github.com/davdroman/swift-builders",
"state" : {
"revision" : "a283b1ab4f028f13ca2843df340087d3dada5f26",
"version" : "0.5.0"
}
},
{
"identity" : "swift-custom-dump",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-custom-dump",
"state" : {
"revision" : "edd66cace818e1b1c6f1b3349bb1d8e00d6f8b01",
"version" : "1.0.0"
}
},
{
"identity" : "xctest-dynamic-overlay",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
"state" : {
"revision" : "23cbf2294e350076ea4dbd7d5d047c1e76b03631",
"version" : "1.0.2"
}
}
],
"version" : 2
}
9 changes: 4 additions & 5 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
// swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.
// swift-tools-version:5.7

import PackageDescription

let package = Package(
name: "TextBuilder",
platforms: [
.iOS(.v13),
.macOS(.v10_15),
.tvOS(.v13),
.macOS(.v10_15),
.watchOS(.v6),
],
products: [
Expand All @@ -34,6 +33,6 @@ let package = Package(

package.dependencies = [
.package(url: "https://github.com/google/swift-benchmark", from: "0.1.2"),
.package(url: "https://github.com/davdroman/swift-builders", from: "0.2.0"),
.package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "0.5.0"),
.package(url: "https://github.com/davdroman/swift-builders", from: "0.5.0"),
.package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "1.0.0"),
]
49 changes: 0 additions & 49 deletions Sources/TextBuilder/TextBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import SwiftUI
/// Text("amet, consectetur")
/// }
///
#if compiler(>=5.7)
@resultBuilder
public struct TextBuilderWith<Separator: TextBuilderSeparator> {
@inlinable
Expand Down Expand Up @@ -80,51 +79,3 @@ public struct TextBuilderWith<Separator: TextBuilderSeparator> {
component ?? .empty
}
}
#else
@resultBuilder
public struct TextBuilderWith<Separator: TextBuilderSeparator> {
@inlinable
public static func buildArray(_ texts: [[Text]]) -> [Text] {
texts.flatMap { $0 }
}

@inlinable
public static func buildBlock(_ texts: [Text]...) -> [Text] {
texts.flatMap { $0 }
}

@inlinable
public static func buildEither(first texts: [Text]) -> [Text] {
texts
}

@inlinable
public static func buildEither(second texts: [Text]) -> [Text] {
texts
}

@inlinable
public static func buildExpression<S: StringProtocol>(_ string: S) -> [Text] {
[Text(string)]
}

@inlinable
public static func buildExpression(_ text: Text) -> [Text] {
[text]
}

@inlinable
public static func buildLimitedAvailability(_ texts: [Text]) -> [Text] {
texts
}

@inlinable
public static func buildOptional(_ texts: [Text]?) -> [Text] {
texts ?? []
}

public static func buildFinalResult(_ texts: [Text]) -> Text {
texts.joined(separator: Separator.separator.map(Text.init)) ?? .empty
}
}
#endif
96 changes: 47 additions & 49 deletions TextBuilder.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
@@ -1,52 +1,50 @@
{
"object": {
"pins": [
{
"package": "swift-argument-parser",
"repositoryURL": "https://github.com/apple/swift-argument-parser",
"state": {
"branch": null,
"revision": "fee6933f37fde9a5e12a1e4aeaa93fe60116ff2a",
"version": "1.2.2"
}
},
{
"package": "Benchmark",
"repositoryURL": "https://github.com/google/swift-benchmark",
"state": {
"branch": null,
"revision": "8163295f6fe82356b0bcf8e1ab991645de17d096",
"version": "0.1.2"
}
},
{
"package": "swift-builders",
"repositoryURL": "https://github.com/davdroman/swift-builders",
"state": {
"branch": null,
"revision": "a8fd97e32b7bb65f3fc1bd7d72725155fb2b4d77",
"version": "0.4.0"
}
},
{
"package": "swift-custom-dump",
"repositoryURL": "https://github.com/pointfreeco/swift-custom-dump",
"state": {
"branch": null,
"revision": "de8ba65649e7ee317b9daf27dd5eebf34bd4be57",
"version": "0.9.1"
}
},
{
"package": "xctest-dynamic-overlay",
"repositoryURL": "https://github.com/pointfreeco/xctest-dynamic-overlay",
"state": {
"branch": null,
"revision": "ab8c9f45843694dd16be4297e6d44c0634fd9913",
"version": "0.8.4"
}
"pins" : [
{
"identity" : "swift-argument-parser",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser",
"state" : {
"revision" : "fee6933f37fde9a5e12a1e4aeaa93fe60116ff2a",
"version" : "1.2.2"
}
]
},
"version": 1
},
{
"identity" : "swift-benchmark",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/swift-benchmark",
"state" : {
"revision" : "8163295f6fe82356b0bcf8e1ab991645de17d096",
"version" : "0.1.2"
}
},
{
"identity" : "swift-builders",
"kind" : "remoteSourceControl",
"location" : "https://github.com/davdroman/swift-builders",
"state" : {
"revision" : "a283b1ab4f028f13ca2843df340087d3dada5f26",
"version" : "0.5.0"
}
},
{
"identity" : "swift-custom-dump",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-custom-dump",
"state" : {
"revision" : "edd66cace818e1b1c6f1b3349bb1d8e00d6f8b01",
"version" : "1.0.0"
}
},
{
"identity" : "xctest-dynamic-overlay",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
"state" : {
"revision" : "23cbf2294e350076ea4dbd7d5d047c1e76b03631",
"version" : "1.0.2"
}
}
],
"version" : 2
}

0 comments on commit 836dffc

Please sign in to comment.