Skip to content

Commit 61a1bc2

Browse files
committed
[Distributed] remove public default AnyActorTransport alias
The previously set public AnyActorTransport was a temporary thing, and instead we want to set this in every module that declares such actors.
1 parent 5daac06 commit 61a1bc2

22 files changed

+63
-17
lines changed

stdlib/public/Distributed/ActorTransport.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,6 @@ public struct AnyActorTransport: ActorTransport {
108108
}
109109
}
110110

111-
/// Use the existential wrapper as the default actor transport.
112-
@available(SwiftStdlib 5.6, *)
113-
public typealias DefaultActorTransport = AnyActorTransport
111+
///// Use the existential wrapper as the default actor transport.
112+
//@available(SwiftStdlib 5.6, *)
113+
//public typealias DefaultActorTransport = AnyActorTransport

stdlib/public/Distributed/DistributedActor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public protocol AnyActor: Sendable, AnyObject {}
3535
/// distributed actor.
3636
@available(SwiftStdlib 5.6, *)
3737
public protocol DistributedActor:
38-
AnyActor, Sendable, Identifiable, Hashable, Codable {
38+
AnyActor, Identifiable, Hashable, Codable {
3939
/// The type of transport used to communicate with actors of this type.
4040
associatedtype Transport: ActorTransport
4141

test/Distributed/Inputs/dynamic_replacement_da_decl.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
import _Distributed
1616

1717
distributed actor DA {
18+
typealias Transport = AnyActorTransport
19+
1820
distributed func hello(other: DA) {}
1921
}
2022

test/Distributed/SIL/distributed_actor_default_deinit_sil.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
import _Distributed
66

7+
/// Use the existential wrapper as the default actor transport.
8+
typealias DefaultActorTransport = AnyActorTransport
9+
710
class SomeClass {}
811

912
distributed actor MyDistActor {

test/Distributed/SIL/distributed_actor_default_init_sil.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
import _Distributed
66

7+
/// Use the existential wrapper as the default actor transport.
8+
typealias DefaultActorTransport = AnyActorTransport
9+
710
class SomeClass {}
811

912
distributed actor MyDistActor {

test/Distributed/actor_protocols.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ struct E: Actor {
3232

3333
// ==== -----------------------------------------------------------------------
3434

35-
distributed actor DA: DistributedActor {} // ok
35+
distributed actor DA: DistributedActor {
36+
typealias Transport = AnyActorTransport
37+
}
3638

3739
actor A2: DistributedActor {
3840
// expected-error@-1{{non-distributed actor type 'A2' cannot conform to the 'DistributedActor' protocol}} {{1-1=distributed }}

test/Distributed/distributed_actor_basic.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
import _Distributed
66

7+
/// Use the existential wrapper as the default actor transport.
8+
typealias DefaultActorTransport = AnyActorTransport
9+
710
distributed actor DA {
811
}
912

test/Distributed/distributed_actor_cannot_be_downcast_to_actor.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
import _Distributed
66

7+
/// Use the existential wrapper as the default actor transport.
8+
typealias DefaultActorTransport = AnyActorTransport
9+
710
@available(SwiftStdlib 5.6, *)
811
extension Actor {
912
func f() -> String { "Life is Study!" }

test/Distributed/distributed_actor_func_implicitly_async_throws.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
import _Distributed
66

7+
/// Use the existential wrapper as the default actor transport.
8+
typealias DefaultActorTransport = AnyActorTransport
9+
710
@available(SwiftStdlib 5.6, *)
811
distributed actor D {
912

test/Distributed/distributed_actor_inference.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
import _Distributed
66

7+
/// Use the existential wrapper as the default actor transport.
8+
typealias DefaultActorTransport = AnyActorTransport
9+
710
actor SomeActor { }
811

912
// ==== ------------------------------------------------------------------------

0 commit comments

Comments
 (0)