diff --git a/Sources/InstrumentationBaggage/Baggage.swift b/Sources/InstrumentationBaggage/Baggage.swift index 83889a3..267e56a 100644 --- a/Sources/InstrumentationBaggage/Baggage.swift +++ b/Sources/InstrumentationBaggage/Baggage.swift @@ -224,8 +224,8 @@ extension Baggage { // MARK: - Propagating Baggage -#if swift(>=5.5) -@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) +#if swift(>=5.5) && canImport(_Concurrency) +@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) extension Baggage { /// A `Baggage` automatically propagated through task-local storage. This API enables binding a top-level `Baggage` and passing it /// implicitly to any child tasks when using structured concurrency. diff --git a/Tests/InstrumentationBaggageTests/BaggageTests.swift b/Tests/InstrumentationBaggageTests/BaggageTests.swift index ef8ce31..835bfa3 100644 --- a/Tests/InstrumentationBaggageTests/BaggageTests.swift +++ b/Tests/InstrumentationBaggageTests/BaggageTests.swift @@ -63,8 +63,8 @@ final class BaggageTests: XCTestCase { } func test_automaticPropagationThroughTaskLocal() throws { - #if swift(>=5.5) - guard #available(macOS 12, iOS 15, tvOS 15, watchOS 8, *) else { + #if swift(>=5.5) && canImport(_Concurrency) + guard #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) else { throw XCTSkip("Task locals are not supported on this platform.") }