Skip to content

Commit 241d0ea

Browse files
authored
Merge pull request #5 from swhitty/swift-5.10
Support Swift 5.10
2 parents c9b9fbc + 272c419 commit 241d0ea

File tree

5 files changed

+31
-8
lines changed

5 files changed

+31
-8
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
xcode_15_0_1:
10-
runs-on: macos-13
9+
xcode_15_2:
10+
runs-on: macos-14
1111
env:
12-
DEVELOPER_DIR: /Applications/Xcode_15.0.1.app/Contents/Developer
12+
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v3
@@ -40,6 +40,19 @@ jobs:
4040
- name: Test
4141
run: swift test --skip-build
4242

43+
linux_swift_5_10:
44+
runs-on: ubuntu-latest
45+
container: swift:5.10
46+
steps:
47+
- name: Checkout
48+
uses: actions/checkout@v3
49+
- name: Version
50+
run: swift --version
51+
- name: Build
52+
run: swift build --build-tests
53+
- name: Test
54+
run: swift test --skip-build
55+
4356
linux_swift_5_9_2:
4457
runs-on: ubuntu-latest
4558
container: swift:5.9.2

Package.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ extension Array where Element == SwiftSetting {
3131

3232
static var upcomingFeatures: [SwiftSetting] {
3333
[
34-
.enableUpcomingFeature("ExistentialAny")
34+
.enableUpcomingFeature("ExistentialAny"),
35+
.enableExperimentalFeature("StrictConcurrency")
3536
]
3637
}
3738
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![Build](https://github.com/swhitty/KeyValueCoder/actions/workflows/build.yml/badge.svg)](https://github.com/swhitty/KeyValueCoder/actions/workflows/build.yml)
22
[![CodeCov](https://codecov.io/gh/swhitty/KeyValueCoder/branch/main/graphs/badge.svg)](https://codecov.io/gh/swhitty/KeyValueCoder/branch/main)
3-
[![Swift 5.9](https://img.shields.io/badge/swift-5.8%20–%205.9-red.svg?style=flat)](https://developer.apple.com/swift)
3+
[![Swift 5.9](https://img.shields.io/badge/swift-5.8%20–%205.10-red.svg?style=flat)](https://developer.apple.com/swift)
44
[![License](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://opensource.org/licenses/MIT)
55
[![Twitter](https://img.shields.io/badge/twitter-@simonwhitty-blue.svg)](http://twitter.com/simonwhitty)
66

Sources/KeyValueEncoder.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ public enum NilCodingStrategy {
6666
case placeholder(Any, isNull: (Any) -> Bool)
6767

6868
/// `nil` values are substituted with `Optional<Any>.none`. Can be cast to any optional type.
69-
public static let `default` = NilCodingStrategy.placeholder(Optional<Any>.none as Any, isNull: isOptionalNone)
69+
public static var `default`: NilCodingStrategy { .placeholder(Optional<Any>.none as Any, isNull: isOptionalNone) }
7070

7171
/// `nil` values are substituted with `"$null"` placeholder string. Compatible with `PropertyListEncoder`.
72-
public static let stringNull = NilCodingStrategy.placeholder("$null", isNull: { ($0 as? String == "$null") })
72+
public static var stringNull: NilCodingStrategy { .placeholder("$null", isNull: { ($0 as? String == "$null") }) }
7373

7474
/// `nil` values are substituted with `"NSNull()"`. Compatible with `JSONSerialization`.
75-
public static let nsNull = NilCodingStrategy.placeholder(NSNull(), isNull: { $0 is NSNull })
75+
public static var nsNull: NilCodingStrategy { .placeholder(NSNull(), isNull: { $0 is NSNull }) }
7676
}
7777

7878
extension KeyValueEncoder {

docker-run-tests.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
3+
set -eu
4+
5+
docker run -it \
6+
--rm \
7+
--mount src="$(pwd)",target=/package,type=bind \
8+
swift:5.10-jammy \
9+
/usr/bin/swift test --package-path /package

0 commit comments

Comments
 (0)