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

The protobuf version checking is too strict #466

Closed
Tim-Zhang opened this issue Dec 30, 2019 · 4 comments
Closed

The protobuf version checking is too strict #466

Tim-Zhang opened this issue Dec 30, 2019 · 4 comments

Comments

@Tim-Zhang
Copy link

Tim-Zhang commented Dec 30, 2019

What's you consideration about the limitation generated files compatible only with the same version of runtime?

People are used to import protobuf by writing protobuf = "2.8.0" in cargo.toml, and rust would use a version between 2.8.0 and 3.0.0, so the incompatible errors may occurred frequently.

It's inconvenient to regenerate codes for the minor/patch version updates, and the codes generated by protobuf-codegen 2.8.1 should be compatible with protobuf 2.8.0 if we follow the rust convention.

@stepancheg
Copy link
Owner

It's hard to:

  • make API used in generated code backwards compatible
  • it's hard to check that changes do not break generated code

Version 2.9 was the version where strict version checking was introduced.

However, a lot of projects broke, so I had to yank that version.

Maybe we should revert this restriction. It is not clear now.

But anyway, the best way to use rust-protobuf is to generate .rs files from .proto files from build.rs.

@Tim-Zhang
Copy link
Author

Tim-Zhang commented Jan 4, 2020

I think we should revert the restriction and if there are any compatible problems in future versions just increase the major version.

@stepancheg
Copy link
Owner

OK, I did not intend to put version check in 2.10 (this was actually the reason why 2.9 was yanked). Going to revert it now.

@stepancheg
Copy link
Owner

Published 2.10.1

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