Files
swift-mirror/stdlib/public/Distributed/AssertDistributed.swift
Konrad `ktoso` Malawski cee89ec541 [Distributed] DistributedActorSystem renaming and redesign (#40387)
* [Distributed] towards DistributedActorSystem; synthesize the id earlier, since Identifiable.id

* Fix execute signature to what Pavel is working with

* funcs are ok in sil

* fixed lifetime of id in inits

* fix distributed_actor_deinit

* distributed_actor_local

* update more tests

fixing tests

fix TBD test

fix Serialization/distributed

fix irgen test

Fix null pointer crashes

* prevent issues with null func ptrs and fix Distributed prorotocol test

* fix deinit sil test
2021-12-13 11:29:25 +09:00

34 lines
1.4 KiB
Swift

//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
import Swift
/// Report a call to a _remote function on a distributed (remote) actor,
/// that was not dynamically replaced by some specific DistributedActorSystem library.
@_transparent
public func _missingDistributedActorSystem(
className: StaticString, functionName: StaticString,
file: StaticString, line: UInt, column: UInt
) -> Never {
// This function is marked @_transparent so that it is inlined into the caller
// (the remote function stub), and, depending on the build configuration,
// redundant parameter values (#file etc.) are eliminated, and don't leak
// information about the user's source.
fatalError(
"""
Invoked remote placeholder function '\(functionName)' on remote \
distributed actor of type '\(className)'. Configure an appropriate \
'DistributedActorSystem' for this actor to resolve this error (e.g. by depending \
on some specific actor system library).
""", file: file, line: line)
}