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

Migrate to protobuf-lite #20

Merged
merged 3 commits into from
Apr 11, 2024
Merged

Conversation

edaniels
Copy link
Member

This makes custom modular APIs not possible until we add some extra code but this will increase compatibility a ton. Yes we are just trading to another evil/compromise (protocolbuffers/protobuf#8104), but I believe in cases where someone is new to Viam and bringing their own module API, they are likely able to use protobuf-lite. If someone is on the server and they truly need protobuf-java, we should consider abstracting the SDK a bit more across the platforms to have them provide separate protobuf-java and protobuf-lite generated files and more generic grpc client/service classes to support this. As of right now based on how this SDK is constructed, the two cannot co-exist and we've seen more android use cases anyway.

@edaniels edaniels requested a review from a team as a code owner April 11, 2024 18:28
@edaniels edaniels requested review from njooma and stuqdog and removed request for a team April 11, 2024 18:28
@edaniels edaniels force-pushed the protobuf-lite branch 2 times, most recently from 74d73e3 to 897a8d1 Compare April 11, 2024 20:08
Copy link
Member

@njooma njooma left a comment

Choose a reason for hiding this comment

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

Ya I think eventually maybe we need to abstract more to work with both normal and lite versions especially since it breaks custom APIs

@edaniels
Copy link
Member Author

edaniels commented Apr 11, 2024

Ya I think eventually maybe we need to abstract more to work with both normal and lite versions especially since it breaks custom APIs

Yeah my vote would be just duplicate the code. There's no commonality between lite and java. They way you get custom APIs is to have user include the proto FileDescriptorSets which buf can easily create and put in a resources directory for you. protobuf-java does it automatically, unlike -lite

@edaniels edaniels merged commit c87a6d0 into viamrobotics:main Apr 11, 2024
2 checks passed
@edaniels edaniels deleted the protobuf-lite branch April 11, 2024 21:32
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