Skip to content

Commit 137e4cc

Browse files
authored
Merge pull request #18 from LiveUI/codex/update-to-latest-swift-version
Update project to Swift 6
2 parents 855aeb7 + 09d6e70 commit 137e4cc

File tree

10 files changed

+10
-68
lines changed

10 files changed

+10
-68
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:4.0
1+
// swift-tools-version:6.0
22
import PackageDescription
33

44

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
[![Slack](https://img.shields.io/badge/join-slack-745EAF.svg?style=flat)](http://bit.ly/2B0dEyt)
44
[![Jenkins](https://ci.liveui.io/job/LiveUI/job/XMLCoding/job/master/badge/icon)](https://ci.liveui.io/job/LiveUI/job/XMLCoding/)
55
[![Platforms](https://img.shields.io/badge/platforms-macOS%2010.13%20|%20Ubuntu-ff0000.svg?style=flat)](https://github.com/LiveUI/Boost)
6-
[![Swift 4](https://img.shields.io/badge/swift-4.1-orange.svg?style=flat)](http://swift.org)
6+
[![Swift 6.1](https://img.shields.io/badge/swift-6.1-orange.svg?style=flat)](http://swift.org)
77
[![Vapor 3](https://img.shields.io/badge/vapor-3.0-blue.svg?style=flat)](https://vapor.codes)
88

9-
XMLEncoder & XMLDecoder using the codable protocol in Swift 4
9+
XMLEncoder & XMLDecoder using the codable protocol in Swift 6
1010

1111

1212
### Testing

Sources/XMLCoding/Encoder/XMLEncoder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import Foundation
1616
open class XMLEncoder {
1717
// MARK: Options
1818
/// The formatting of the output XML data.
19-
public struct OutputFormatting : OptionSet {
19+
public struct OutputFormatting: OptionSet, Sendable {
2020
/// The format's default value.
2121
public let rawValue: UInt
2222

Sources/XMLCoding/ISO8601DateFormatter.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@
88

99
import Foundation
1010

11+
@available(OSX 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
12+
extension ISO8601DateFormatter: @unchecked @retroactive Sendable {}
13+
1114
//===----------------------------------------------------------------------===//
1215
// Shared ISO8601 Date Formatter
1316
//===----------------------------------------------------------------------===//
1417

1518
// NOTE: This value is implicitly lazy and _must_ be lazy. We're compiled against the latest SDK (w/ ISO8601DateFormatter), but linked against whichever Foundation the user has. ISO8601DateFormatter might not exist, so we better not hit this code path on an older OS.
1619
@available(OSX 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
17-
internal var _iso8601Formatter: ISO8601DateFormatter = {
20+
internal let _iso8601Formatter: ISO8601DateFormatter = {
1821
let formatter = ISO8601DateFormatter()
1922
formatter.formatOptions = .withInternetDateTime
2023
return formatter

Tests/LinuxMain.swift

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

Tests/XMLCodingTests/XCTestManifests.swift

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

Tests/XMLCodingTests/XMLParsingTests.swift

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -663,23 +663,5 @@ class XMLParsingTests: XCTestCase {
663663
XCTAssertEqual(response, response2)
664664
}
665665

666-
static var allTests = [
667-
("testValuesElement", testValuesElement),
668-
("testEmptyValuesElement", testEmptyValuesElement),
669-
("testFailOnMissingStringElement", testFailOnMissingStringElement),
670-
("testFailOnMissingDataElement", testFailOnMissingDataElement),
671-
("testOptionalEmptyValuesElement", testOptionalEmptyValuesElement),
672-
("testOptionalMissingValuesElement", testOptionalMissingValuesElement),
673-
("testOptionalEmptyValuesCombinedTagElement", testOptionalEmptyValuesCombinedTagElement),
674-
("testValuesWithISO8601DateElement", testValuesWithISO8601DateElement),
675-
("testEmptyStructureElement", testEmptyStructureElement),
676-
("testEmptyStructureElementNotEffectingPreviousElement", testEmptyStructureElementNotEffectingPreviousElement),
677-
("testListDecodingWithDefaultStrategy", testListDecodingWithDefaultStrategy),
678-
("testMapDecodingWithDefaultStrategy", testMapDecodingWithDefaultStrategy),
679-
("testMapDecodingWithCollapsedMap", testMapDecodingWithCollapsedMap),
680-
("testMapDecodingWithCollapsedListAndMap", testMapDecodingWithCollapsedListAndMap),
681-
("testSingletonListDecodingWithDefaultStrategy", testSingletonListDecodingWithDefaultStrategy),
682-
("testListDecodingWithCollapseItemTagStrategy", testListDecodingWithCollapseItemTagStrategy),
683-
("testSingletonListDecodingWithCollapseItemTagStrategy", testSingletonListDecodingWithCollapseItemTagStrategy)
684-
]
666+
// Tests discovered automatically
685667
}

docker/test/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM liveui/boost-base:1.1.1
1+
FROM swift:6.1
22

33
WORKDIR /app
44

scripts/docker-shortcuts/test.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#!/usr/bin/env bash
22

3-
# Generate up-to-date test interface
4-
echo "👾 Generate up-to-date test interface"
5-
swift test --generate-linuxmain
6-
73
# Build
84
echo "🤖 Build"
95
docker build -f ./docker/test/Dockerfile -t xmlcoding .

scripts/generate-linuxmain.sh

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

0 commit comments

Comments
 (0)