Comments (2)
Thanks for the report, I'll check what's up with that.
rdar://128368486
from swift.
Foud a small reproducer:
import Distributed
public struct CustomResultHandler: DistributedTargetInvocationResultHandler {
public typealias SerializationRequirement = any Codable
public func onReturn<Success: Codable>(value: Success) async throws {}
public func onReturnVoid() async throws {}
public func onThrow<Err>(error: Err) async throws where Err : Error {}
}
public struct CustomActorInvocationEncoder: DistributedTargetInvocationEncoder {
public typealias SerializationRequirement = any Codable
public mutating func recordArgument<Value: Codable>(_ argument: RemoteCallArgument<Value>) throws {}
public mutating func recordGenericSubstitution<T>(_ type: T.Type) throws {}
public mutating func recordReturnType<R: Codable>(_ type: R.Type) throws {}
public mutating func recordErrorType<E: Error>(_ type: E.Type) throws {}
public mutating func doneRecording() throws {}
}
public struct CustomActorInvocationDecoder: DistributedTargetInvocationDecoder {
public typealias SerializationRequirement = any Codable
public mutating func decodeNextArgument<Argument: Codable>() throws -> Argument { fatalError() }
public mutating func decodeGenericSubstitutions() throws -> [Any.Type] { [] }
public mutating func decodeErrorType() throws -> (Any.Type)? { nil }
public mutating func decodeReturnType() throws -> (Any.Type)? { nil }
}
public final class CustomActorSystem {
}
extension CustomActorSystem: DistributedActorSystem {
public typealias SerializationRequirement = any Codable
public typealias ActorID = Int
public typealias InvocationEncoder = CustomActorInvocationEncoder
public typealias InvocationDecoder = CustomActorInvocationDecoder
public typealias ResultHandler = CustomResultHandler
public func resolve<Act: DistributedActor>(id: ActorID, as actorType: Act.Type) throws -> Act? where ActorID == Act.ID {
fatalError()
}
public func assignID<Act: DistributedActor>(_ actorType: Act.Type) -> ActorID where ActorID == Act.ID {
fatalError()
}
public func actorReady<Act: DistributedActor>(_ actor: Act) where ActorID == Act.ID {
fatalError()
}
public func resignID(_ id: ActorID) {
fatalError()
}
public func makeInvocationEncoder() -> InvocationEncoder {
fatalError()
}
public func remoteCall<Act: DistributedActor, Err: Error, Res: Codable>(
on actor: Act,
target: RemoteCallTarget,
invocation: inout InvocationEncoder,
throwing _: Err.Type,
returning _: Res.Type
) async throws -> Res where Act.ID == ActorID {
fatalError()
}
public func remoteCallVoid<Act: DistributedActor, Err: Error>(
on actor: Act,
target: RemoteCallTarget,
invocation: inout InvocationEncoder,
throwing error: Err.Type
) async throws where Act.ID == ActorID {
fatalError()
}
}
If you move the protocol conformance of DistributedActorSystem
from the extension to the class declaration it doesn't crash anymore.
Hope that helps 😄
from swift.
Related Issues (20)
- Protocol existentials do not trigger warnings if they will never be executed HOT 1
- Windows version number support for the @available attribute
- Variadic generics cause crash in UsePrespecialized pass HOT 1
- Property definition has inferred type 'some Proto', involving the 'some' return type of another declaration HOT 3
- A typo in a protocol name can crash the compiler under certain conditions
- Conditional compilation results in the code passing the check for missing executable statement
- [Observation] Compiler Crash and Runtime Crash when Observable Object is Generic on Parameter Pack
- DistributedActor as Actor witness already known crash in DistributedCluster library
- Macros seem to be expanded in their own sub-scope HOT 2
- SILGen assertion failure when compiling unreachable lazy local variable
- indices(of:) is only available in macOS 9999 or newer HOT 1
- Non generic functions accept generic specialization syntax in some cases
- Failed to produce diagnostic for expression in SwiftUI code
- Bug in Embedded/ARC/WebAssembly combination?
- `UnownedTaskExecutor` should be `Hashable` HOT 2
- Expected assignment to opaque type fails
- Compilation error related to `@TaskLocal` on the latest nightly toolchains.
- [Source compatibility suite] Projects failing to build due to compiler crash - compile command failed due to signal 11 (use -v to see invocation)
- Compiler crash when setting strict concurrency complete and default UIView param
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift.