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

Generate inline code for wrapper classes by default #95

Open
maximecb opened this issue May 6, 2024 · 2 comments
Open

Generate inline code for wrapper classes by default #95

maximecb opened this issue May 6, 2024 · 2 comments

Comments

@maximecb
Copy link
Contributor

maximecb commented May 6, 2024

Currently, we create a runtime dependency if people use the Google wrapper classes. Given how commonly used these classes are, I think it might make sense to always inline them by default. Being able to generate fully self-contained code, zero external dependencies, seems like a big selling point for protoboeuf. We also only need to generate/inline the wrapper classes that people actually use, so the code size impact will probably be pretty small.

@tenderworks

@tenderworks
Copy link
Contributor

I don't think we're generating any code that depends on Google's libraries. We generate some code that depends on ProtoBoeuf at the moment (all of the built-in classes), but I think it's the right thing to do. For example, anyone depending on .google.protobuf.BoolValue will depend on ProtoBoeuf::Protobuf::BoolValue in the generated code.

@maximecb
Copy link
Contributor Author

I think we should consider including ProtoBoeuf::Protobuf::BoolValue in the generated code if it's being used, to avoid having a dependency on ProtoBoeuf in the generated code, make it fully self-contained.

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

No branches or pull requests

2 participants