Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add global type registry #371

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sessfeld
Copy link
Contributor

@sessfeld sessfeld commented Sep 7, 2022

When messages are imported, add them to a global type registry as a side-effect. That allows users to omit typeRegistry when interacting with Any.

I'm adding this a draft right now, because this definitely requires changes to the docs, and probably another test case. I'm also not sure about the typecast I'm using in jsonReadOptions and jsonWriteOptions. I originally did this implementation as a patch to the compiled package, so there were no types.

Closes #131

@sessfeld sessfeld marked this pull request as ready for review November 4, 2022 11:34
@timruffles
Copy link

Are you still working on this, and is there anything I can do to help? Would be very useful.

@sessfeld
Copy link
Contributor Author

Full disclosure: I haven't touched this PR since I opened it, but we've been using this implementation internally since then.

Where I was unsure is with the typecast that I had to do after the mergeJsonOptions, I have no idea if this is correct like this.

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.

Automatic message registry
2 participants