Repository navigation
Support discarded RPC calls on protocols without replies - #10165
effect-bot wants to merge 7 commits into
Conversation
🦋 Changeset detectedLatest commit: 80f7e22 The changes in this PR will be included in the next version bump. This PR includes changesets to release 33 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|
|
Closing unmerged, replaced by #10171. A client The existing contract already covers delivery-only transports. The protocol writes a void |
A custom
RpcClient.Protocolthat delivers requests but never replies (a message queue, a one-way socket) cannot usediscard: truetoday: since 4.1.0 a discarded call waits for an acknowledgementExitthat never arrives, so it never completes.This adds a
supportsRepliescapability toRpcClient.Protocol, alongsidesupportsAckandsupportsTransferables. WithsupportsReplies: false:discard: truecall completes oncesendsucceeds, and fails with thesenderror if it fails.makeregisters no reply entry for it.makeNoSerializationtracks it in a lifecycle entry only while the send is pending, so closing the client can interrupt the call and its send. The entry is removed when the send completes, fails or is interrupted, or when the client closes, so nothing (request, callerContext, schemas) is kept after the send. Interrupting the caller interrupts the pending send and sends noInterruptmessage.ChunkandExit) are ignored, so they cannot complete a call. A connection-wideDefectstill fails every pending call.RpcClientError(RpcClientDefect) naming the rpc, and nothing is sent.All built-in protocols set
supportsReplies: true, so acknowledged transports keep the 4.1 acknowledgement behaviour.makeNoSerializationgains a matching optionalsupportsRepliesoption (defaulttrue). BecauseProtocolis@stability unstable, the field is required, like its siblings. Custom protocols must add it, and the changeset says so.Closes #10159
Closes EFF-3149