From c9d1ee2ca83bcc3e77998fe578eb4a4da3a3ff25 Mon Sep 17 00:00:00 2001 From: Zach Date: Tue, 6 Aug 2024 22:33:51 -0600 Subject: [PATCH] Remove Publisher and SendableValue from Linux and Windows (#9) --- Package.swift | 2 ++ Sources/Later/SendableValue/SendableValue.swift | 2 ++ Tests/LaterTests/Publisher/PublisherTests.swift | 2 ++ Tests/LaterTests/SendableValue/SendableValueTests.swift | 2 ++ 4 files changed, 8 insertions(+) diff --git a/Package.swift b/Package.swift index 41bc381..8848257 100644 --- a/Package.swift +++ b/Package.swift @@ -19,6 +19,7 @@ let package = Package( ) ], dependencies: [ + // Used for GitHub CI .package(url: "https://github.com/swiftlang/swift-testing.git", exact: "0.8.0") ], targets: [ @@ -33,6 +34,7 @@ let package = Package( name: "LaterTests", dependencies: [ "Later", + // Used for GitHub CI .product(name: "Testing", package: "swift-testing") ] ) diff --git a/Sources/Later/SendableValue/SendableValue.swift b/Sources/Later/SendableValue/SendableValue.swift index 431cd8d..d0c612f 100644 --- a/Sources/Later/SendableValue/SendableValue.swift +++ b/Sources/Later/SendableValue/SendableValue.swift @@ -1,3 +1,4 @@ +#if !os(Linux) && !os(Windows) import os @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 9.0, *) @@ -32,3 +33,4 @@ public struct SendableValue: Sendable { } } } +#endif diff --git a/Tests/LaterTests/Publisher/PublisherTests.swift b/Tests/LaterTests/Publisher/PublisherTests.swift index a3e4403..865bf07 100644 --- a/Tests/LaterTests/Publisher/PublisherTests.swift +++ b/Tests/LaterTests/Publisher/PublisherTests.swift @@ -1,3 +1,4 @@ +#if !os(Linux) && !os(Windows) import Testing @testable import Later @@ -322,3 +323,4 @@ struct PublisherTests { #expect(values == ["Initial value", nil, "Edge case value", nil]) } } +#endif diff --git a/Tests/LaterTests/SendableValue/SendableValueTests.swift b/Tests/LaterTests/SendableValue/SendableValueTests.swift index 258ea73..abfd36b 100644 --- a/Tests/LaterTests/SendableValue/SendableValueTests.swift +++ b/Tests/LaterTests/SendableValue/SendableValueTests.swift @@ -1,3 +1,4 @@ +#if !os(Linux) && !os(Windows) import Testing @testable import Later @@ -167,3 +168,4 @@ struct SendableValueTests { #expect(value == 0) } } +#endif