diff --git a/Plugins/Libraries/LighterGeneration/SchemaLoader.swift b/Plugins/Libraries/LighterGeneration/SchemaLoader.swift index 769630a..ef11db0 100644 --- a/Plugins/Libraries/LighterGeneration/SchemaLoader.swift +++ b/Plugins/Libraries/LighterGeneration/SchemaLoader.swift @@ -1,11 +1,16 @@ // // Created by Helge Heß. -// Copyright © 2022 ZeeZide GmbH. +// Copyright © 2022-2024 ZeeZide GmbH. // import SQLite3 import SQLite3Schema -import Foundation +#if !(os(macOS) || os(iOS) || os(watchOS) || os(tvOS)) && swift(>=5.9) +@preconcurrency import Foundation +#else +import class Foundation.FileManager +import struct Foundation.URL +#endif /** * A helper class that can load schemas from SQLite database *and* a set of diff --git a/Plugins/Libraries/LighterGeneration/Utilities/CamelCase.swift b/Plugins/Libraries/LighterGeneration/Utilities/CamelCase.swift index 9bceddc..3ae7066 100644 --- a/Plugins/Libraries/LighterGeneration/Utilities/CamelCase.swift +++ b/Plugins/Libraries/LighterGeneration/Utilities/CamelCase.swift @@ -3,7 +3,7 @@ // ZeeQL3 // // Created by Helge Hess on 19/05/17. -// Copyright © 2017-2022 ZeeZide GmbH. All rights reserved. +// Copyright © 2017-2024 ZeeZide GmbH. All rights reserved. // import struct Foundation.CharacterSet diff --git a/Plugins/Libraries/LighterGeneration/Utilities/ConcurrencyCompat.swift b/Plugins/Libraries/LighterGeneration/Utilities/ConcurrencyCompat.swift new file mode 100644 index 0000000..61bd9c9 --- /dev/null +++ b/Plugins/Libraries/LighterGeneration/Utilities/ConcurrencyCompat.swift @@ -0,0 +1,14 @@ +// +// Created by Helge Heß. +// Copyright © 2024 ZeeZide GmbH. +// + + +#if !(os(macOS) || os(iOS) || os(watchOS) || os(tvOS)) && swift(>=5.9) + #if compiler(<6) // seems necessary? + import struct Foundation.CharacterSet + import class Foundation.DateFormatter + extension CharacterSet : @unchecked Sendable {} + extension DateFormatter : @unchecked Sendable {} + #endif +#endif diff --git a/Sources/Lighter/Schema/SQLiteValueType.swift b/Sources/Lighter/Schema/SQLiteValueType.swift index 665fbc9..f06209b 100644 --- a/Sources/Lighter/Schema/SQLiteValueType.swift +++ b/Sources/Lighter/Schema/SQLiteValueType.swift @@ -5,9 +5,10 @@ import SQLite3 #if canImport(Foundation) -#if !(os(macOS) || os(iOS) || os(watchOS) || os(tvOS)) && swift(>=5.10) +#if !(os(macOS) || os(iOS) || os(watchOS) || os(tvOS)) && swift(>=5.9) @preconcurrency import Foundation #if compiler(<6) // seems necessary? + extension Date : @unchecked Sendable {} extension Decimal : @unchecked Sendable {} extension Locale : @unchecked Sendable {} extension URL : @unchecked Sendable {}