Skip to content

Commit fc83047

Browse files
committed
[Distributed] Update availability of distributed types to 5.7
1 parent 1186b1c commit fc83047

8 files changed

+32
-32
lines changed

stdlib/public/Distributed/DistributedActor.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import _Concurrency
2020
///
2121
/// FIXME(distributed): We'd need Actor to also conform to this, but don't want to add that conformance in _Concurrency yet.
2222
@_marker
23-
@available(SwiftStdlib 5.6, *)
23+
@available(SwiftStdlib 5.7, *)
2424
public protocol AnyActor: Sendable, AnyObject {
2525
}
2626

@@ -34,7 +34,7 @@ public protocol AnyActor: Sendable, AnyObject {
3434
///
3535
/// The 'DistributedActor' protocol provides the core functionality of any
3636
/// distributed actor.
37-
@available(SwiftStdlib 5.6, *)
37+
@available(SwiftStdlib 5.7, *)
3838
public protocol DistributedActor:
3939
AnyActor,
4040
Identifiable,
@@ -84,7 +84,7 @@ public protocol DistributedActor:
8484

8585
// ==== Hashable conformance ---------------------------------------------------
8686

87-
@available(SwiftStdlib 5.6, *)
87+
@available(SwiftStdlib 5.7, *)
8888
extension DistributedActor {
8989
nonisolated public func hash(into hasher: inout Hasher) {
9090
self.id.hash(into: &hasher)
@@ -98,11 +98,11 @@ extension DistributedActor {
9898
// ==== Codable conformance ----------------------------------------------------
9999

100100
extension CodingUserInfoKey {
101-
@available(SwiftStdlib 5.6, *)
101+
@available(SwiftStdlib 5.7, *)
102102
public static let actorSystemKey = CodingUserInfoKey(rawValue: "$distributed_actor_system")!
103103
}
104104

105-
@available(SwiftStdlib 5.6, *)
105+
@available(SwiftStdlib 5.7, *)
106106
extension DistributedActor {
107107
nonisolated public init(from decoder: Decoder) throws {
108108
guard let system = decoder.userInfo[.actorSystemKey] as? ActorSystem else {
@@ -123,7 +123,7 @@ extension DistributedActor {
123123

124124
// ==== Local actor special handling -------------------------------------------
125125

126-
@available(SwiftStdlib 5.6, *)
126+
@available(SwiftStdlib 5.7, *)
127127
extension DistributedActor {
128128

129129
/// Executes the passed 'body' only when the distributed actor is local instance.

stdlib/public/Distributed/DistributedActorSystem.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import Swift
1313
import _Concurrency
1414

15-
@available(SwiftStdlib 5.6, *)
15+
@available(SwiftStdlib 5.7, *)
1616
public protocol DistributedActorSystem: Sendable {
1717
/// The identity used by actors that communicate via this transport
1818
associatedtype ActorID: Sendable & Hashable & Codable // TODO: make Codable conditional here
@@ -135,7 +135,7 @@ public protocol DistributedActorSystem: Sendable {
135135

136136
// ==== ----------------------------------------------------------------------------------------------------------------
137137
// MARK: Execute Distributed Methods
138-
@available(SwiftStdlib 5.6, *)
138+
@available(SwiftStdlib 5.7, *)
139139
extension DistributedActorSystem {
140140

141141
/// Prepare and execute a call to the distributed function identified by the passed arguments,
@@ -307,7 +307,7 @@ extension DistributedActorSystem {
307307
}
308308
}
309309

310-
@available(SwiftStdlib 5.6, *)
310+
@available(SwiftStdlib 5.7, *)
311311
@_silgen_name("swift_distributed_execute_target")
312312
func _executeDistributedTarget(
313313
on actor: AnyObject, // DistributedActor
@@ -323,7 +323,7 @@ func _executeDistributedTarget(
323323
// ==== ----------------------------------------------------------------------------------------------------------------
324324
// MARK: Support types
325325
/// A distributed 'target' can be a `distributed func` or `distributed` computed property.
326-
@available(SwiftStdlib 5.6, *)
326+
@available(SwiftStdlib 5.7, *)
327327
public struct RemoteCallTarget {
328328
let _mangledName: String // TODO: StaticString would be better here; no arc, codesize of cleanups
329329

@@ -425,7 +425,7 @@ public protocol DistributedTargetInvocationDecoder : AnyObject {
425425
func decodeReturnType() throws -> Any.Type?
426426
}
427427

428-
@available(SwiftStdlib 5.6, *)
428+
@available(SwiftStdlib 5.7, *)
429429
public protocol DistributedTargetInvocationResultHandler {
430430
associatedtype SerializationRequirement
431431

@@ -439,10 +439,10 @@ public protocol DistributedTargetInvocationResultHandler {
439439
/******************************************************************************/
440440

441441
/// Error protocol to which errors thrown by any `DistributedActorSystem` should conform.
442-
@available(SwiftStdlib 5.6, *)
442+
@available(SwiftStdlib 5.7, *)
443443
public protocol DistributedActorSystemError: Error {}
444444

445-
@available(SwiftStdlib 5.6, *)
445+
@available(SwiftStdlib 5.7, *)
446446
public struct ExecuteDistributedTargetError: DistributedActorSystemError {
447447
let message: String
448448

@@ -451,7 +451,7 @@ public struct ExecuteDistributedTargetError: DistributedActorSystemError {
451451
}
452452
}
453453

454-
@available(SwiftStdlib 5.6, *)
454+
@available(SwiftStdlib 5.7, *)
455455
public struct DistributedActorCodingError: DistributedActorSystemError {
456456
public let message: String
457457

stdlib/public/Distributed/DistributedMetadata.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Swift
1515
/// Get the parameter count from a mangled method name.
1616
///
1717
/// - Returns: May return a negative number to signal a decoding error.
18-
@available(SwiftStdlib 5.6, *)
18+
@available(SwiftStdlib 5.7, *)
1919
public // SPI _Distributed
2020
func _getParameterCount(mangledMethodName name: String) -> Int32 {
2121
let nameUTF8 = Array(name.utf8)
@@ -25,7 +25,7 @@ func _getParameterCount(mangledMethodName name: String) -> Int32 {
2525
}
2626
}
2727

28-
@available(SwiftStdlib 5.6, *)
28+
@available(SwiftStdlib 5.7, *)
2929
@_silgen_name("swift_func_getParameterCount")
3030
public // SPI _Distributed
3131
func __getParameterCount(
@@ -38,7 +38,7 @@ func __getParameterCount(
3838
///
3939
/// - Returns: the actual number of types written,
4040
/// or negative value to signify an error
41-
@available(SwiftStdlib 5.6, *)
41+
@available(SwiftStdlib 5.7, *)
4242
public // SPI _Distributed
4343
func _getParameterTypeInfo(
4444
mangledMethodName name: String,
@@ -56,7 +56,7 @@ func _getParameterTypeInfo(
5656

5757
/// - Returns: the actual number of types written,
5858
/// or a negative value to signal decoding error.
59-
@available(SwiftStdlib 5.6, *)
59+
@available(SwiftStdlib 5.7, *)
6060
@_silgen_name("swift_func_getParameterTypeInfo")
6161
public // SPI _Distributed
6262
func __getParameterTypeInfo(
@@ -66,7 +66,7 @@ func __getParameterTypeInfo(
6666
_ types: Builtin.RawPointer, _ typesLength: Int
6767
) -> Int32
6868

69-
@available(SwiftStdlib 5.6, *)
69+
@available(SwiftStdlib 5.7, *)
7070
public // SPI _Distributed
7171
func _getReturnTypeInfo(
7272
mangledMethodName name: String,
@@ -80,7 +80,7 @@ func _getReturnTypeInfo(
8080
}
8181
}
8282

83-
@available(SwiftStdlib 5.6, *)
83+
@available(SwiftStdlib 5.7, *)
8484
@_silgen_name("swift_func_getReturnTypeInfo")
8585
public // SPI _Distributed
8686
func __getReturnTypeInfo(
@@ -93,15 +93,15 @@ func __getReturnTypeInfo(
9393

9494
/// Retrieve a generic environment descriptor associated with
9595
/// the given distributed target
96-
@available(SwiftStdlib 5.6, *)
96+
@available(SwiftStdlib 5.7, *)
9797
@_silgen_name("swift_distributed_getGenericEnvironment")
9898
public // SPI _Distributed
9999
func _getGenericEnvironmentOfDistributedTarget(
100100
_ targetNameStart: UnsafePointer<UInt8>,
101101
_ targetNameLength: UInt
102102
) -> UnsafeRawPointer?
103103

104-
@available(SwiftStdlib 5.6, *)
104+
@available(SwiftStdlib 5.7, *)
105105
@_silgen_name("swift_distributed_getWitnessTables")
106106
public // SPI _Distributed
107107
func _getWitnessTablesFor(

test/Distributed/distributed_actor_accessor_section_coff.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct LargeStruct : Codable {
4444
var d: Double
4545
}
4646

47-
@available(SwiftStdlib 5.6, *)
47+
@available(SwiftStdlib 5.7, *)
4848
public distributed actor MyActor {
4949
distributed func simple1(_: Int) {
5050
}
@@ -78,7 +78,7 @@ public distributed actor MyActor {
7878
}
7979
}
8080

81-
@available(SwiftStdlib 5.6, *)
81+
@available(SwiftStdlib 5.7, *)
8282
public distributed actor MyOtherActor {
8383
distributed func empty() {
8484
}

test/Distributed/distributed_actor_accessor_section_elf.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct LargeStruct : Codable {
4242
var d: Double
4343
}
4444

45-
@available(SwiftStdlib 5.6, *)
45+
@available(SwiftStdlib 5.7, *)
4646
public distributed actor MyActor {
4747
distributed func simple1(_: Int) {
4848
}
@@ -76,7 +76,7 @@ public distributed actor MyActor {
7676
}
7777
}
7878

79-
@available(SwiftStdlib 5.6, *)
79+
@available(SwiftStdlib 5.7, *)
8080
public distributed actor MyOtherActor {
8181
distributed func empty() {
8282
}

test/Distributed/distributed_actor_accessor_section_macho.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct LargeStruct : Codable {
4242
var d: Double
4343
}
4444

45-
@available(SwiftStdlib 5.6, *)
45+
@available(SwiftStdlib 5.7, *)
4646
public distributed actor MyActor {
4747
distributed func simple1(_: Int) {
4848
}
@@ -76,7 +76,7 @@ public distributed actor MyActor {
7676
}
7777
}
7878

79-
@available(SwiftStdlib 5.6, *)
79+
@available(SwiftStdlib 5.7, *)
8080
public distributed actor MyOtherActor {
8181
distributed func empty() {
8282
}

test/Distributed/distributed_actor_accessor_thunks_32bit.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct LargeStruct : Codable {
4444
var d: Double
4545
}
4646

47-
@available(SwiftStdlib 5.6, *)
47+
@available(SwiftStdlib 5.7, *)
4848
public distributed actor MyActor {
4949
distributed func simple1(_: Int) {
5050
}
@@ -82,7 +82,7 @@ public distributed actor MyActor {
8282
}
8383
}
8484

85-
@available(SwiftStdlib 5.6, *)
85+
@available(SwiftStdlib 5.7, *)
8686
public distributed actor MyOtherActor {
8787
distributed func empty() {
8888
}

test/Distributed/distributed_actor_accessor_thunks_64bit.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct LargeStruct : Codable {
4444
var d: Double
4545
}
4646

47-
@available(SwiftStdlib 5.6, *)
47+
@available(SwiftStdlib 5.7, *)
4848
public distributed actor MyActor {
4949
distributed func simple1(_: Int) {
5050
}
@@ -82,7 +82,7 @@ public distributed actor MyActor {
8282
}
8383
}
8484

85-
@available(SwiftStdlib 5.6, *)
85+
@available(SwiftStdlib 5.7, *)
8686
public distributed actor MyOtherActor {
8787
distributed func empty() {
8888
}

0 commit comments

Comments
 (0)