Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:4.0
// swift-tools-version:6.0
import PackageDescription


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

XMLEncoder & XMLDecoder using the codable protocol in Swift 4
XMLEncoder & XMLDecoder using the codable protocol in Swift 6


### Testing
Expand Down
2 changes: 1 addition & 1 deletion Sources/XMLCoding/Encoder/XMLEncoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Foundation
open class XMLEncoder {
// MARK: Options
/// The formatting of the output XML data.
public struct OutputFormatting : OptionSet {
public struct OutputFormatting: OptionSet, Sendable {
/// The format's default value.
public let rawValue: UInt

Expand Down
5 changes: 4 additions & 1 deletion Sources/XMLCoding/ISO8601DateFormatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@

import Foundation

@available(OSX 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
extension ISO8601DateFormatter: @unchecked @retroactive Sendable {}

//===----------------------------------------------------------------------===//
// Shared ISO8601 Date Formatter
//===----------------------------------------------------------------------===//

// 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.
@available(OSX 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
internal var _iso8601Formatter: ISO8601DateFormatter = {
internal let _iso8601Formatter: ISO8601DateFormatter = {
let formatter = ISO8601DateFormatter()
formatter.formatOptions = .withInternetDateTime
return formatter
Expand Down
8 changes: 0 additions & 8 deletions Tests/LinuxMain.swift

This file was deleted.

28 changes: 0 additions & 28 deletions Tests/XMLCodingTests/XCTestManifests.swift

This file was deleted.

20 changes: 1 addition & 19 deletions Tests/XMLCodingTests/XMLParsingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -663,23 +663,5 @@ class XMLParsingTests: XCTestCase {
XCTAssertEqual(response, response2)
}

static var allTests = [
("testValuesElement", testValuesElement),
("testEmptyValuesElement", testEmptyValuesElement),
("testFailOnMissingStringElement", testFailOnMissingStringElement),
("testFailOnMissingDataElement", testFailOnMissingDataElement),
("testOptionalEmptyValuesElement", testOptionalEmptyValuesElement),
("testOptionalMissingValuesElement", testOptionalMissingValuesElement),
("testOptionalEmptyValuesCombinedTagElement", testOptionalEmptyValuesCombinedTagElement),
("testValuesWithISO8601DateElement", testValuesWithISO8601DateElement),
("testEmptyStructureElement", testEmptyStructureElement),
("testEmptyStructureElementNotEffectingPreviousElement", testEmptyStructureElementNotEffectingPreviousElement),
("testListDecodingWithDefaultStrategy", testListDecodingWithDefaultStrategy),
("testMapDecodingWithDefaultStrategy", testMapDecodingWithDefaultStrategy),
("testMapDecodingWithCollapsedMap", testMapDecodingWithCollapsedMap),
("testMapDecodingWithCollapsedListAndMap", testMapDecodingWithCollapsedListAndMap),
("testSingletonListDecodingWithDefaultStrategy", testSingletonListDecodingWithDefaultStrategy),
("testListDecodingWithCollapseItemTagStrategy", testListDecodingWithCollapseItemTagStrategy),
("testSingletonListDecodingWithCollapseItemTagStrategy", testSingletonListDecodingWithCollapseItemTagStrategy)
]
// Tests discovered automatically
}
2 changes: 1 addition & 1 deletion docker/test/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM liveui/boost-base:1.1.1
FROM swift:6.1

WORKDIR /app

Expand Down
4 changes: 0 additions & 4 deletions scripts/docker-shortcuts/test.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#!/usr/bin/env bash

# Generate up-to-date test interface
echo "👾 Generate up-to-date test interface"
swift test --generate-linuxmain

# Build
echo "🤖 Build"
docker build -f ./docker/test/Dockerfile -t xmlcoding .
Expand Down
3 changes: 0 additions & 3 deletions scripts/generate-linuxmain.sh

This file was deleted.