Skip to content

Conversation

chriso
Copy link
Contributor

@chriso chriso commented Jun 26, 2024

This PR updates the serialization layer:

  • it's now possible to serialize values that implement either encoding.TextMarshaler or encoding.BinaryMarshaler. These are sent across the wire as strings or bytes, using built-in protobuf wrappers
  • it's now possible to serialize values that implement json.Marshaler. These are sent across the wire using the built-in protobuf struct Value
  • it's now possible to serialize nil values and nil pointers
  • the NewAny function has been renamed to Marshal

Since dispatchrun/dispatch#79, the CLI knows how to inspect and display all built-in protobuf message types.

A follow-up PR will add support to the Python SDK for producing and consuming these built-in messages (edit: see dispatchrun/dispatch-py#179).

@chriso chriso marked this pull request as ready for review June 26, 2024 01:48
@chriso chriso self-assigned this Jun 26, 2024
Copy link
Contributor

@achille-roussel achille-roussel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@chriso chriso merged commit 8565b4e into main Jun 26, 2024
@chriso chriso deleted the proto-serde branch June 26, 2024 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants