Skip to content

Commit eaf7308

Browse files
committed
Merge branch 'develop'
2 parents a577ad3 + db57c1f commit eaf7308

File tree

5 files changed

+17
-19
lines changed

5 files changed

+17
-19
lines changed

.github/workflows/swift.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
image:
16-
- swift:5.0.3-xenial
17-
- swift:5.1.5-xenial
1816
- swift:5.2.5-xenial
19-
- swift:5.3.2-xenial
2017
- swift:5.3.2-bionic
18+
- swift:5.5.0-focal
2119
container: ${{ matrix.image }}
2220
steps:
2321
- name: Checkout Repository
@@ -34,7 +32,7 @@ jobs:
3432
- name: Select latest available Xcode
3533
uses: maxim-lobanov/setup-xcode@v1.2.1
3634
with:
37-
xcode-version: 12.2
35+
xcode-version: 13
3836
- name: Checkout Repository
3937
uses: actions/checkout@v2
4038
- name: Build Swift Debug Package

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ let package = Package(
1717

1818
dependencies: [
1919
.package(url: "https://github.com/apple/swift-nio.git",
20-
from: "2.25.1"),
20+
from: "2.33.0"),
2121
/* use this for proper 100-continue until
2222
https://github.com/apple/swift-nio/pull/1330 is working:
2323
.package(url: "file:///Users/helge/dev/Swift/NIO/swift-nio-helje5",
2424
.branch("feature/100-continue")),
2525
*/
2626
.package(url: "https://github.com/apple/swift-log.git",
27-
from: "1.4.0")
27+
from: "1.4.2")
2828
],
2929

3030
targets: [

Sources/MacroCore/JSON.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,7 @@ public let _defaultJSONEncoderOptions : JSONEncoder.OutputFormatting = {
156156

157157
// MARK: - JSON Streams
158158

159-
public extension WritableStreamType where WritablePayload == Buffer,
160-
Self : ErrorEmitterTarget
161-
{
159+
public extension WritableStreamType where WritablePayload == Buffer {
162160

163161
@discardableResult
164162
@inlinable

Sources/MacroCore/Process/Process.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ public extension process { // File System
3535

3636
@inlinable
3737
static func cwd() -> String {
38-
let rc = xsys.getcwd(nil /* malloc */, 0)
39-
assert(rc != nil, "process has no cwd??")
40-
defer { free(rc) }
41-
guard rc != nil else { return "" }
42-
43-
let s = String(validatingUTF8: rc!)
38+
let pathMaybe = xsys.getcwd(nil /* malloc */, 0)
39+
assert(pathMaybe != nil, "process has no cwd??")
40+
guard let path = pathMaybe else { return "" }
41+
defer { free(path) }
42+
43+
let s = String(validatingUTF8: path)
4444
assert(s != nil, "could not convert cwd to String?!")
45-
return s!
45+
return s ?? "/tmp"
4646
}
4747
}
4848

Tests/MacroTests/AgentTests.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ final class AgentTests: XCTestCase {
1414
let exp = expectation(description: "get result")
1515

1616
http.get("https://zeezide.de") { res in
17-
XCTAssertEqual(res.statusCode, 200)
17+
XCTAssertEqual(res.statusCode, 200, "Status code is not 200!")
1818

1919
res.onError { error in
2020
XCTAssert(false, "an error happened: \(error)")
@@ -23,8 +23,10 @@ final class AgentTests: XCTestCase {
2323
res | concat { buffer in
2424
do {
2525
let s = try buffer.toString()
26-
XCTAssert(s.contains("<html"))
27-
XCTAssert(s.contains("ZeeZide"))
26+
XCTAssert(s.contains("<html"),
27+
"buffer does not start w/ <html: \(s)")
28+
XCTAssert(s.contains("ZeeZide"),
29+
"buffer does not contain ZeeZide: \(s)")
2830
}
2931
catch {
3032
XCTAssert(false, "failed to grab string: \(error)")

0 commit comments

Comments
 (0)