Skip to content

Commit a0b6fb9

Browse files
authored
Swift 5 (#42)
* Swift 5 * XcodeGen
1 parent feb18e7 commit a0b6fb9

10 files changed

+50
-21
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2
33
jobs:
44
build:
55
macos:
6-
xcode: "10.1.0"
6+
xcode: "10.2.0"
77

88
steps:
99
- checkout

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.1
1+
swift-5.0-DEVELOPMENT-SNAPSHOT-2019-03-10-a

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM swift:4.2
1+
FROM norionomura/swift:swift-5.0-branch
22

33
WORKDIR /package
44

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 Point-Free, Inc.
3+
Copyright (c) 2019 Point-Free, Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ imports = \
22
@testable import OvertureTests;
33

44
xcodeproj:
5-
xcodegen
5+
PF_DEVELOP=1 swift run xcodegen
66

77
linux-main:
88
sourcery \
@@ -27,7 +27,7 @@ test-ios:
2727
set -o pipefail && \
2828
xcodebuild test \
2929
-scheme Overture_iOS \
30-
-destination platform="iOS Simulator,name=iPhone XR,OS=12.1" \
30+
-destination platform="iOS Simulator,name=iPhone XR,OS=12.2" \
3131
| xcpretty
3232

3333
test-swift:

Package.resolved

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

Package.swift

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// swift-tools-version:4.0
1+
// swift-tools-version:5.0
2+
import Foundation
23
import PackageDescription
34

45
let package = Package(
@@ -8,8 +9,6 @@ let package = Package(
89
name: "Overture",
910
targets: ["Overture"]),
1011
],
11-
dependencies: [
12-
],
1312
targets: [
1413
.target(
1514
name: "Overture",
@@ -19,3 +18,11 @@ let package = Package(
1918
dependencies: ["Overture"]),
2019
]
2120
)
21+
22+
if ProcessInfo.processInfo.environment.keys.contains("PF_DEVELOP") {
23+
package.dependencies.append(
24+
contentsOf: [
25+
.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.3.0"),
26+
]
27+
)
28+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 🎼 Overture
22

3-
[![Swift 4.2](https://img.shields.io/badge/swift-4.2-ED523F.svg?style=flat)](https://swift.org/download/)
3+
[![Swift 5](https://img.shields.io/badge/swift-5-ED523F.svg?style=flat)](https://swift.org/download/)
44
[![iOS/macOS CI](https://img.shields.io/circleci/project/github/pointfreeco/swift-overture/master.svg?label=ios/macos)](https://circleci.com/gh/pointfreeco/swift-overture)
55
[![Linux CI](https://img.shields.io/travis/pointfreeco/swift-overture/master.svg?label=linux)](https://travis-ci.org/pointfreeco/swift-overture)
66
[![@pointfreeco](https://img.shields.io/badge/contact-@pointfreeco-5AA9E7.svg?style=flat)](https://twitter.com/pointfreeco)

Tests/LinuxMain.swift

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,22 @@ extension FlipTests {
6161
("testFlip", testFlip)
6262
]
6363
}
64+
extension KeyPathTests {
65+
static var allTests: [(String, (KeyPathTests) -> () throws -> Void)] = [
66+
("testGet", testGet),
67+
("testProp", testProp),
68+
("testOver", testOver),
69+
("testSet", testSet),
70+
("testInoutMprop", testInoutMprop),
71+
("testInoutMver", testInoutMver),
72+
("testInoutMut", testInoutMut),
73+
("testAnyObjectAnyObjectMprop", testAnyObjectAnyObjectMprop),
74+
("testAnyObjectInoutMprop", testAnyObjectInoutMprop),
75+
("testAnyObjectAnyObjectMver", testAnyObjectAnyObjectMver),
76+
("testAnyObjectInoutMver", testAnyObjectInoutMver),
77+
("testAnyObjectMut", testAnyObjectMut)
78+
]
79+
}
6480
extension PipeTests {
6581
static var allTests: [(String, (PipeTests) -> () throws -> Void)] = [
6682
("testPipe2", testPipe2),
@@ -75,6 +91,17 @@ extension PipeTests {
7591
("testThrowingPipe6", testThrowingPipe6)
7692
]
7793
}
94+
extension SettersTests {
95+
static var allTests: [(String, (SettersTests) -> () throws -> Void)] = [
96+
("testOver", testOver),
97+
("testSet", testSet),
98+
("testInoutMver", testInoutMver),
99+
("testAnyObjectInoutMver", testAnyObjectInoutMver),
100+
("testAnyObjectAnyObjectMver", testAnyObjectAnyObjectMver),
101+
("testInoutMut", testInoutMut),
102+
("testAnyObjectMut", testAnyObjectMut)
103+
]
104+
}
78105
extension UncurryTests {
79106
static var allTests: [(String, (UncurryTests) -> () throws -> Void)] = [
80107
("testUncurry", testUncurry),
@@ -86,7 +113,8 @@ extension WithTests {
86113
("testWith", testWith),
87114
("testInPlaceWith", testInPlaceWith),
88115
("testValueCopyableWith", testValueCopyableWith),
89-
("testReferenceMutableWith", testReferenceMutableWith)
116+
("testReferenceMutableWith", testReferenceMutableWith),
117+
("testAmbiguity", testAmbiguity)
90118
]
91119
}
92120
extension ZipTests {
@@ -112,7 +140,9 @@ XCTMain([
112140
testCase(ConcatTests.allTests),
113141
testCase(CurryTests.allTests),
114142
testCase(FlipTests.allTests),
143+
testCase(KeyPathTests.allTests),
115144
testCase(PipeTests.allTests),
145+
testCase(SettersTests.allTests),
116146
testCase(UncurryTests.allTests),
117147
testCase(WithTests.allTests),
118148
testCase(ZipTests.allTests),

project.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ targets:
1515
path: Info.plist
1616
platform: [macOS, iOS, tvOS, watchOS]
1717
scheme:
18-
testTargets: [OvertureTests_$platform]
18+
testTargets: ['OvertureTests_${platform}']
1919
settings:
2020
APPLICATION_EXTENSION_API_ONLY: true
2121
sources: [Sources]
2222
type: framework
2323
OvertureTests:
24-
dependencies: [{target: Overture_$platform}]
24+
dependencies: [{target: 'Overture_${platform}'}]
2525
platform: [macOS, iOS, tvOS, watchOS]
2626
sources:
2727
- path: Tests

0 commit comments

Comments
 (0)