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

ProtoBuf is experimental, when will it be stable, is it safe to use in a large KMM project? #2544

Closed
codingingBoy opened this issue Jan 15, 2024 · 4 comments
Labels

Comments

@codingingBoy
Copy link

No description provided.

@codingingBoy codingingBoy changed the title ProtoBuf is experemental, when will it be stable, is it safe to use in a large KMM project? ProtoBuf is experimental, when will it be stable, is it safe to use in a large KMM project? Jan 15, 2024
@pdvrieze
Copy link
Contributor

You probably want an official answer as well, but my one is: it depends. The experimental is more that there are limitations to the support of certain Kotlin features. In theory there could also be future changes in how the format maps to protobuf, but I expect that those will be enabled behind configuration options. As such, if you want to use protobuf to communicate between two Kotlin programs (client/server) it should be fine. If you want to use it for permanent storage maybe less.

@codingingBoy
Copy link
Author

You probably want an official answer as well, but my one is: it depends. The experimental is more that there are limitations to the support of certain Kotlin features. In theory there could also be future changes in how the format maps to protobuf, but I expect that those will be enabled behind configuration options. As such, if you want to use protobuf to communicate between two Kotlin programs (client/server) it should be fine. If you want to use it for permanent storage maybe less.

Thasks for answer, I also want's to know is there any expected time for this function to be stable?

@xiaozhikang0916
Copy link
Contributor

xiaozhikang0916 commented Jan 17, 2024

I also have a question may be related.
Can I expect that serialization.ProtoBuf will support full specific of Protocol Buffer 2/3, e.g. Reserving unknown fields, parsing any message. Or it is just a tool to encode kotlin class to binary in protobuf format?

For context, our groups are using proto3 syntex to define RPC methods and messages between clients(iOS and android) and servers(go), and we are migrating from Java class generated by protoc to kotlin data class.

@sandwwraith
Copy link
Member

It is marked as 'experimental' mainly because it is not feature-complete (e.g. lack of oneof support), and it is not a top-priority project. Therefore, there are no particular time commitments for adding new features.
However, it also means that there are no big API changes expected (even if the features would be added), so it is safe to use it in your projects, given that you are able to sync the dependency version properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants