diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 22724929..0296e0e9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ on: jobs: test-pushpull: runs-on: ubuntu-latest - container: swift:5.9.2-jammy + container: swift:5.10.1-jammy steps: - uses: actions/checkout@v3 - name: Run tests diff --git a/Package.swift b/Package.swift index c5eba2d0..e81545f7 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.9 +// swift-tools-version:5.10 import PackageDescription @@ -34,7 +34,10 @@ let package = Package( .product(name: "Collections", package: "swift-collections"), .product(name: "Logging", package: "swift-log"), ], - exclude: ["Abstraction/README.md", "Framework/README.md"] + exclude: ["Abstraction/README.md", "Framework/README.md"], + swiftSettings: [ + .enableExperimentalFeature("StrictConcurrency=complete") + ] ), .target( name: "HTMLKitConverter", @@ -56,6 +59,9 @@ let package = Package( dependencies: [ .target(name: "HTMLKit"), .product(name: "Vapor", package: "vapor"), + ], + swiftSettings: [ + .enableExperimentalFeature("StrictConcurrency=complete") ] ), .target( diff --git a/Sources/HTMLKit/Framework/Localization/InterpolationArgument.swift b/Sources/HTMLKit/Framework/Localization/InterpolationArgument.swift index 415c7513..83c1e7f2 100644 --- a/Sources/HTMLKit/Framework/Localization/InterpolationArgument.swift +++ b/Sources/HTMLKit/Framework/Localization/InterpolationArgument.swift @@ -5,7 +5,7 @@ import Foundation /// Each case corresponds to a specific data type and provides a placeholder /// that can be used for replacing values in the localized string. @_documentation(visibility: internal) -public enum InterpolationArgument { +public enum InterpolationArgument: Sendable { /// Holds an integer value case int(Int) diff --git a/Sources/HTMLKit/Framework/Localization/LocalizedString.swift b/Sources/HTMLKit/Framework/Localization/LocalizedString.swift index fa00f711..a88668b3 100644 --- a/Sources/HTMLKit/Framework/Localization/LocalizedString.swift +++ b/Sources/HTMLKit/Framework/Localization/LocalizedString.swift @@ -2,7 +2,7 @@ import Foundation /// A type thats holds the information for the localization @_documentation(visibility: internal) -public struct LocalizedString: Content { +public struct LocalizedString: Content, Sendable { /// The key of the translation value internal let key: LocalizedStringKey diff --git a/Sources/HTMLKit/Framework/Localization/LocalizedStringKey.swift b/Sources/HTMLKit/Framework/Localization/LocalizedStringKey.swift index 0e138f5e..ce657c34 100644 --- a/Sources/HTMLKit/Framework/Localization/LocalizedStringKey.swift +++ b/Sources/HTMLKit/Framework/Localization/LocalizedStringKey.swift @@ -2,7 +2,7 @@ import Foundation /// A string key for the localization @_documentation(visibility: internal) -public struct LocalizedStringKey { +public struct LocalizedStringKey: Sendable { /// The key value internal let value: String diff --git a/Sources/HTMLKit/Framework/Localization/TranslationTable.swift b/Sources/HTMLKit/Framework/Localization/TranslationTable.swift index cd6a481b..b47f6caf 100644 --- a/Sources/HTMLKit/Framework/Localization/TranslationTable.swift +++ b/Sources/HTMLKit/Framework/Localization/TranslationTable.swift @@ -1,7 +1,7 @@ /// A type that represents a translation table /// /// A translation table stores multiple localized strings, mapping unique string keys to their corresponding translations -internal struct TranslationTable { +internal struct TranslationTable: Sendable { /// The name of the table internal let name: String diff --git a/Sources/HTMLKit/Framework/Rendering/Features.swift b/Sources/HTMLKit/Framework/Rendering/Features.swift index 550a6957..f8106a4f 100644 --- a/Sources/HTMLKit/Framework/Rendering/Features.swift +++ b/Sources/HTMLKit/Framework/Rendering/Features.swift @@ -1,7 +1,7 @@ /// An option set of different features /// /// The feature set provides the flexibility to enable experimental features if desired. -public struct Features: Swift.OptionSet { +public struct Features: Swift.OptionSet, Sendable { public var rawValue: Int diff --git a/Sources/HTMLKit/Framework/Rendering/Markdown/Markdown.swift b/Sources/HTMLKit/Framework/Rendering/Markdown/Markdown.swift index 49cf8cfc..073e430c 100644 --- a/Sources/HTMLKit/Framework/Rendering/Markdown/Markdown.swift +++ b/Sources/HTMLKit/Framework/Rendering/Markdown/Markdown.swift @@ -1,6 +1,6 @@ import Foundation -internal final class Markdown { +internal struct Markdown: Sendable { /// The markdowns characters internal static let characters = CharacterSet(charactersIn: "*_~[`")