Skip to content

Commit

Permalink
deprecate Baggage names
Browse files Browse the repository at this point in the history
  • Loading branch information
ktoso committed May 26, 2023
1 parent 57ac081 commit aeb20f0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 40 deletions.
3 changes: 3 additions & 0 deletions Sources/InstrumentationBaggage/CompatibilityShims.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@

@_exported import ServiceContextModule

@available(*, deprecated, message: "Use 'ServiceContext' from 'ServiceContextModule' instead.")
public typealias Baggage = ServiceContext
@available(*, deprecated, message: "Use 'ServiceContext' from 'ServiceContextModule' instead.")
public typealias BaggageKey = ServiceContextKey
@available(*, deprecated, message: "Use 'ServiceContext' from 'ServiceContextModule' instead.")
public typealias AnyBaggageKey = AnyServiceContextKey
38 changes: 0 additions & 38 deletions Tests/ServiceContextTests/ServiceContext+XCTest.swift

This file was deleted.

1 change: 0 additions & 1 deletion Tests/ServiceContextTests/ServiceContextTests+XCTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ extension ServiceContextTests {
("test_forEachIteratesOverAllServiceContextItems", test_forEachIteratesOverAllServiceContextItems),
("test_TODO_doesNotCrashWithoutExplicitCompilerFlag", test_TODO_doesNotCrashWithoutExplicitCompilerFlag),
("test_automaticPropagationThroughTaskLocal", test_automaticPropagationThroughTaskLocal),
("test", test),
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/ServiceContextTests/ServiceContextTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ final class ServiceContextTests: XCTestCase {
actor SomeActor {
var value: Int = 0

func test() async {
func check() async {
ServiceContext.$current.withValue(.topLevel) {
value = 12 // should produce no warnings
}
Expand Down

0 comments on commit aeb20f0

Please sign in to comment.