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
Bump Protobuf to 3.19.1 which is is Mac M1 osx-aarch_64 compatible. #8724
Comments
You are free to depend on the newer version of protobuf yourself, and then you can use the newer protoc. You should be able to upgrade dependencies to newer versions (with same major version) without issue (the main exception where I wouldn't be surprised if there are issues is bumping the patch version of Netty/tcnative). |
Right if I understood it correctly I can depend on newer versions. The tricky part is to find the right combination of protoc version, protobuf-java, and grpc-java. For the latest grpc-java version, to make it work with the latest protoc & protobuf-java combination, it will be needed to "override" (using maven's |
The easiest thing is to just use the same version of protobuf for protoc and protobuf-java, and use at least the version used by grpc-java.
No need to use dependencyManagement. Just add a direct dependency on protobuf-java and Maven will prefer that version over the transitive dependencies defined by grpc. I do suggest always using mavenEnforcer's requireUpperBoundDeps, however, as Maven happily downgrades transitive dependencies which just asks for trouble. |
Seems like this is resolved. If not, comment, and it can be reopened. |
What version of gRPC-Java are you using?
gRPC-java version 1.42.1
What is your environment?
Mac M1 aarch_64
What did you expect to see?
Release 1.42.1 generates osx-aarch_64 compatible artifacts.
However the protobuf version used is 3.17.2 which does not have a compatible osx-aarch_64.
From the release 1.42.1 notes:
I seems that this release will work correctly with arm64 macs. Probably I understood it wrongly.
What I expect is that using the latest grpc-java arm64 mac compatible and using the latest protoc 3.19.1 which is "compatible" with arm64 mac, I can generate valid code.
What did you see instead?
As I was using a newer compiler, for arm64 compatibility reasons, It was generating code that depends on methods that are not available in the current grpc-java used protobuf 3.17.2 version.
Steps to reproduce the bug
If you try to compile the well know
helloworld.proto
bundled in protoc, you will get the error mentioned previously.I am using the current suggested
protobuf-maven-plugin
to generate code. However I need to dump up theprotocArtifact
to 3.19.1 to use a aarm64 mac compatible artifact.Workaround
Use protoc 3.17.3 which does include osx-aarch_64 based maven artifacts
The text was updated successfully, but these errors were encountered: