Skip to content

Rename the Payload tuple element of cs::encodedReturn service operations to EncodedReturnValue #4933

Description

@bernardnormier

The service-side declaration of a cs::encodedReturn operation with a streamed return returns a tuple whose first
element is the PipeReader holding the encoded non-stream return value. That element is named Payload, or
Payload_ when the streamed return is itself named payload:

ValueTask<(PipeReader Payload, IAsyncEnumerable<string> Entries)> StreamLogAsync(...)

Payload is a misleading name. In IceRPC the payload of the response is the whole byte stream, including the streamed
return that the dispatch appends as the payload continuation. This element is only the encoded return value, which the
generated dispatch code passes through unchanged as the encodeReturnValue result.

Proposal: rename the element to EncodedReturnValue. This is a source-breaking change for service implementations
that construct or access the tuple by name, so it needs an entry in the upgrade notes.

The trailing-underscore fallback for a name collision stays, applied to a streamed return named encodedReturnValue.

The name comes from EncodedReturnPayloadName in OperationExtensions.cs in the IceRpc.Slice.Generator project. The
<returns> doc comment added by #4932 uses the same property, so it follows the rename.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalProposal for a new feature or significant updateslice codec

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions