Skip to content

Conversation

@timostamm
Copy link
Member

This changes the behavior of adding types to a TypeRegistry: A common use case for the TypeRegistry is serializing google.protobuf.Any. That typical involves adding the desired types, and the types they use. We can trivially automate the second part of this, making the TypeRegistry more convenient to use.

This also makes the method add() public, and replaces the static methods fromIterable() and fromTypes() with a single from() that takes all supported types as an input, not just message types.

This changes the behavior of adding types to a TypeRegistry: A common use case for the TypeRegistry is serializing google.protobuf.Any. That typical involves adding the desired types, and the types they use. We can trivially automate the second part of this, making the TypeRegistry more convenient to use.

This also makes the method add() public, and replaces the static methods fromIterable() and fromTypes() with a single from() that takes all supported types as an input, not just message types.
@timostamm timostamm merged commit bcd820a into main Jun 9, 2022
@timostamm timostamm deleted the tstamm/improve-type-registry branch June 9, 2022 07:13
@timostamm timostamm mentioned this pull request Jun 14, 2022
timostamm added a commit to connectrpc/connect-es that referenced this pull request Jun 14, 2022
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