Skip to content

Commit c8457ce

Browse files
authored
Revert "make Baggage Sendable (#17)" (#23)
This reverts commit 2344023.
1 parent 72997ed commit c8457ce

File tree

6 files changed

+6
-67
lines changed

6 files changed

+6
-67
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,3 @@ Package.resolved
55
/*.xcodeproj
66
xcuserdata/
77
.swiftpm
8-
.vscode/
9-
.history

Sources/InstrumentationBaggage/Baggage.swift

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@
1313
//
1414
//===----------------------------------------------------------------------===//
1515

16-
#if swift(>=5.5) && canImport(_Concurrency)
17-
public typealias _Baggage_Sendable = Swift.Sendable
18-
#else
19-
public typealias _Baggage_Sendable = Any
20-
#endif
21-
2216
/// A `Baggage` is a heterogeneous storage type with value semantics for keyed values in a type-safe fashion.
2317
///
2418
/// Its values are uniquely identified via `BaggageKey`s (by type identity). These keys also dictate the type of
@@ -71,8 +65,8 @@ public typealias _Baggage_Sendable = Any
7165
/// `Baggage` does not expose more functions on purpose to prevent abuse and treating it as too much of an
7266
/// arbitrary value smuggling container, but only make it convenient for tracing and instrumentation systems which need
7367
/// to access either specific or all items carried inside a baggage.
74-
public struct Baggage: _Baggage_Sendable {
75-
private var _storage = [AnyBaggageKey: _Baggage_Sendable]()
68+
public struct Baggage {
69+
private var _storage = [AnyBaggageKey: Any]()
7670

7771
/// Internal on purpose, please use `Baggage.TODO` or `Baggage.topLevel` to create an "empty" baggage,
7872
/// which carries more meaning to other developers why an empty baggage was used.
@@ -157,7 +151,7 @@ extension Baggage {
157151

158152
/// Carried automatically by a "to do" baggage.
159153
/// It can be used to track where a baggage originated and which "to do" baggage must be fixed into a real one to avoid this.
160-
public struct TODOLocation: _Baggage_Sendable {
154+
public struct TODOLocation {
161155
/// Source file location where the to-do `Baggage` was created
162156
public let file: String
163157
/// Source line location where the to-do `Baggage` was created

Sources/InstrumentationBaggage/BaggageKey.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
/// }
4040
///
4141
/// This pattern allows library authors fine-grained control over which values may be set, and which only get by end-users.
42-
public protocol BaggageKey: _Baggage_Sendable {
42+
public protocol BaggageKey {
4343
/// The type of value uniquely identified by this key.
44-
associatedtype Value: _Baggage_Sendable
44+
associatedtype Value
4545

4646
/// The human-readable name of this key.
4747
/// This name will be used instead of the type name when a value is printed.
@@ -62,7 +62,7 @@ extension BaggageKey {
6262
}
6363

6464
/// A type-erased `BaggageKey` used when iterating through the `Baggage` using its `forEach` method.
65-
public struct AnyBaggageKey: _Baggage_Sendable {
65+
public struct AnyBaggageKey {
6666
/// The key's type represented erased to an `Any.Type`.
6767
public let keyType: Any.Type
6868

docker/docker-compose.2004.54.yaml

Lines changed: 0 additions & 18 deletions
This file was deleted.

docker/docker-compose.2004.55.yaml

Lines changed: 0 additions & 18 deletions
This file was deleted.

docker/docker-compose.2004.main.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)