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

What version of protoc is supported? #11887

Open
positron opened this issue Feb 10, 2025 · 3 comments
Open

What version of protoc is supported? #11887

positron opened this issue Feb 10, 2025 · 3 comments
Labels

Comments

@positron
Copy link

I was getting com.google.protobuf.RuntimeVersion not found (See #10976). To fix it I downgraded protoc to 25.2 as I saw breaking changes in 26.

I'm not using gradle or maven (this is a clojure project), so I have no idea how to determine what version of protoc I'm supposed to be using.

@kannanjgithub
Copy link
Contributor

You can find com.google.protobuf:protoc version in the README for the version you are using (1.62.2) here https://github.com/grpc/grpc-java/blob/v1.62.2/README.md#generated-code which is

<protocArtifact>com.google.protobuf:protoc:3.25.1:exe:${os.detected.classifier}</protocArtifact>

The protoc version can be inferred from the Protobuf Java minor version number, so that gives you 25.1. Things broke for you with protoc 26 since it is a higher major version of protoc. 25.2 still worked for you since it is the same major version of protoc so the code generated using it is still compatible with com.google.protobuf:protobuf-java 3.25.1 pulled by your grpc-java version.

@positron
Copy link
Author

Ahh that's how you figure it out, ok thank you for that decoder ring.

Keeping the issue open in case you want to spell that out in the README right there. I know this is at least the second issue about it.

@kannanjgithub
Copy link
Contributor

kannanjgithub commented Feb 18, 2025

It doesn't really belong in the gRPC release README but in the protoc libraries' release which does mention about the versioning scheme for protoc vs the language runtime binaries.

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

2 participants