diff --git a/Sources/Tracing/Tracer.swift b/Sources/Tracing/Tracer.swift index 988ff4d..cddc4c3 100644 --- a/Sources/Tracing/Tracer.swift +++ b/Sources/Tracing/Tracer.swift @@ -322,7 +322,7 @@ public func withSpan( /// - operation: The operation that this span should be measuring /// - Returns: the value returned by `operation` /// - Throws: the error the `operation` has thrown (if any) -#if swift(>=6.0) +#if compiler(>=6.0) @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) // for TaskLocal ServiceContext public func withSpan( _ operationName: String, @@ -349,8 +349,10 @@ public func withSpan( } #endif +#if compiler(>=6.0) @_disfavoredOverload @available(*, deprecated, message: "Prefer #isolation version of this API") +#endif @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) // for TaskLocal ServiceContext public func withSpan( _ operationName: String, @@ -398,7 +400,7 @@ public func withSpan( /// - operation: The operation that this span should be measuring /// - Returns: the value returned by `operation` /// - Throws: the error the `operation` has thrown (if any) -#if swift(>=6.0) +#if compiler(>=6.0) @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) // for TaskLocal ServiceContext public func withSpan( _ operationName: String, @@ -424,8 +426,10 @@ public func withSpan( } #endif +#if compiler(>=6.0) @_disfavoredOverload @available(*, deprecated, message: "Prefer #isolation version of this API") +#endif @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) // for TaskLocal ServiceContext public func withSpan( _ operationName: String, @@ -473,7 +477,7 @@ public func withSpan( /// - operation: The operation that this span should be measuring /// - Returns: the value returned by `operation` /// - Throws: the error the `operation` has thrown (if any) -#if swift(>=6.0) +#if compiler(>=6.0) @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func withSpan( _ operationName: String, @@ -500,8 +504,10 @@ public func withSpan( } #endif +#if compiler(>=6.0) @_disfavoredOverload @available(*, deprecated, message: "Prefer #isolation version of this API") +#endif @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func withSpan( _ operationName: String, diff --git a/Sources/Tracing/TracerProtocol+Legacy.swift b/Sources/Tracing/TracerProtocol+Legacy.swift index 4258fe6..b79135b 100644 --- a/Sources/Tracing/TracerProtocol+Legacy.swift +++ b/Sources/Tracing/TracerProtocol+Legacy.swift @@ -307,7 +307,7 @@ extension LegacyTracer { /// - operation: The operation that this span should be measuring /// - Returns: the value returned by `operation` /// - Throws: the error the `operation` has thrown (if any) - #if swift(>=6.0) + #if compiler(>=6.0) public func withAnySpan( _ operationName: String, at instant: @autoclosure () -> Instant, @@ -340,8 +340,10 @@ extension LegacyTracer { } #endif + #if compiler(>=6.0) @_disfavoredOverload @available(*, deprecated, message: "Prefer #isolation version of this API") + #endif public func withAnySpan( _ operationName: String, at instant: @autoclosure () -> Instant, @@ -397,7 +399,7 @@ extension LegacyTracer { /// - operation: The operation that this span should be measuring /// - Returns: the value returned by `operation` /// - Throws: the error the `operation` has thrown (if any) - #if swift(>=6.0) + #if compiler(>=6.0) public func withAnySpan( _ operationName: String, context: @autoclosure () -> ServiceContext = .current ?? .topLevel, @@ -429,8 +431,10 @@ extension LegacyTracer { } #endif + #if compiler(>=6.0) @_disfavoredOverload @available(*, deprecated, message: "Prefer #isolation version of this API") + #endif public func withAnySpan( _ operationName: String, context: @autoclosure () -> ServiceContext = .current ?? .topLevel, @@ -602,7 +606,7 @@ extension Tracer { /// - operation: The operation that this span should be measuring /// - Returns: the value returned by `operation` /// - Throws: the error the `operation` has thrown (if any) - #if swift(>=6.0) + #if compiler(>=6.0) public func withAnySpan( _ operationName: String, at instant: @autoclosure () -> some TracerInstant = DefaultTracerClock.now, @@ -628,8 +632,10 @@ extension Tracer { } #endif + #if compiler(>=6.0) @_disfavoredOverload @available(*, deprecated, message: "Prefer #isolation version of this API") + #endif public func withAnySpan( _ operationName: String, at instant: @autoclosure () -> some TracerInstant = DefaultTracerClock.now, diff --git a/Sources/Tracing/TracerProtocol.swift b/Sources/Tracing/TracerProtocol.swift index d1bfa39..02e6d13 100644 --- a/Sources/Tracing/TracerProtocol.swift +++ b/Sources/Tracing/TracerProtocol.swift @@ -242,7 +242,7 @@ extension Tracer { /// - operation: The operation that this span should be measuring /// - Returns: the value returned by `operation` /// - Throws: the error the `operation` has thrown (if any) - #if swift(>=6.0) + #if compiler(>=6.0) public func withSpan( _ operationName: String, context: @autoclosure () -> ServiceContext = .current ?? .topLevel, @@ -274,8 +274,10 @@ extension Tracer { } #endif + #if compiler(>=6.0) @_disfavoredOverload @available(*, deprecated, message: "Prefer #isolation version of this API") + #endif public func withSpan( _ operationName: String, context: @autoclosure () -> ServiceContext = .current ?? .topLevel, @@ -329,7 +331,7 @@ extension Tracer { /// - operation: The operation that this span should be measuring /// - Returns: the value returned by `operation` /// - Throws: the error the `operation` has thrown (if any) - #if swift(>=6.0) + #if compiler(>=6.0) public func withSpan( _ operationName: String, context: @autoclosure () -> ServiceContext = .current ?? .topLevel, @@ -362,8 +364,10 @@ extension Tracer { } #endif + #if compiler(>=6.0) @_disfavoredOverload @available(*, deprecated, message: "Prefer #isolation version of this API") + #endif public func withSpan( _ operationName: String, context: @autoclosure () -> ServiceContext = .current ?? .topLevel,