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

Propose to build and publish protobuf-v3.0.0-javalite for ARM platform to Maven central #6867

Closed
liusheng opened this issue Nov 11, 2019 · 9 comments

Comments

@liusheng
Copy link

What language does this apply to?
NA

Describe the problem you are trying to solve.
Currently, the protoc-gen-javalite:3.0 has published in the maven central repo, it support linux_x86, osx_x86, windows_x86 system types, but didn't support the ARM64 platform. When build some project such as grpc-java which depend on the protoc-gen-javalite:3.0 on ARM64 server, it will raise error:

3. Execution failed for task ':grpc-protobuf-lite:generateTestProto'.                                                                                                      
> Could not resolve all files for configuration ':grpc-protobuf-lite:protobufToolsLocator_javalite'.                                                                    
   > Could not find protoc-gen-javalite-linux-aarch_64.exe (com.google.protobuf:protoc-gen-javalite:3.0.0).                                                            
     Searched in the following locations:                                                                                                  
         https://maven-central.storage-download.googleapis.com/repos/central/data/com/google/protobuf/protoc-gen-javalite/3.0.0/protoc-gen-javalite-3.0.0-linux-aarch_64.exe

Describe the solution you'd like
It doesn't need to modify anything, only need to build on ARM64 server and published to maven central repo.

Describe alternatives you've considered
Build manually every time

Additional context
NA

@rafi-kamal
Copy link
Contributor

@dankurka

I'm not sure if we want to continue supporting protoc-gen-javalite:3.0. @ejona86 can grpc-java depend on the latest version of protobuf?

@ejona86
Copy link
Contributor

ejona86 commented Nov 13, 2019

@liusheng, I mentioned that upgrading javalite could help at grpc/grpc-java#6364 (comment) .

@rafi-kamal, I was waiting to upgrade until #6565 had documentation on how to workaround, like we had talked about a few months ago.

Although now I'm also trying to remember if it was appropriate to use the pre-compiled protoc from the master branch with javalite even though javalite is on its own branch, since that's the only pre-built binary available https://search.maven.org/search?q=g:com.google.protobuf . We had discussed that at the same time, but in the months since I've forgotten what was decided.

@rafi-kamal
Copy link
Contributor

@liusheng, I mentioned that upgrading javalite could help at grpc/grpc-java#6364 (comment) .

@rafi-kamal, I was waiting to upgrade until #6565 had documentation on how to workaround, like we had talked about a few months ago.

That issue should have been fixed in the 3.10 release :) We are also planning to do a 3.11 release next week.

Although now I'm also trying to remember if it was appropriate to use the pre-compiled protoc from the master branch with javalite even though javalite is on its own branch, since that's the only pre-built binary available https://search.maven.org/search?q=g:com.google.protobuf . We had discussed that at the same time, but in the months since I've forgotten what was decided.

Is it possible to use the regular protoc instead? According to https://github.com/protocolbuffers/protobuf/blob/master/java/lite.md, that should be enough to generate the lite version of the messages.

@ejona86
Copy link
Contributor

ejona86 commented Nov 13, 2019

That issue should have been fixed in the 3.10 release :)

Do you want to close the issue then?

Is it possible to use the regular protoc instead?

That's what I was asking. This is what I had tried before and "it worked" but I wasn't certain it was correct. So the lite generated code is maintained on the master branch, but the runtime is on the javalite branch.

@rafi-kamal
Copy link
Contributor

Sorry for the confusion, the original authors are not around so I'm also not totally sure about the history behind the javalite branch. But that branch is no longer actively maintained, and we've been publishing all the new changes to master and also releasing [protobuf-javalite] (https://mvnrepository.com/artifact/com.google.protobuf/protobuf-javalite) from master. So I think grpc-java should depend on master if possible.

If there is anything missing from master and only available in javalite, please let me know.

@ejona86
Copy link
Contributor

ejona86 commented Nov 13, 2019

Hmmm... So gradle/maven central is working. But it seems Bazel isn't ready on master. I don't see a javalite_toolchain, which is depended on implicitly by java_lite_proto_library rules. So I don't think any bazel users have swapped to the master branch for javalite, unless that is no longer how it is done.

This is on the javalite branch:

protobuf/BUILD

Lines 871 to 877 in 7b64714

proto_lang_toolchain(
name = "javalite_toolchain",
command_line = "--$(PLUGIN_OUT)=$(OUT)",
plugin = ":protoc_gen_javalite",
runtime = ":protobuf_java_lite",
visibility = ["//visibility:public"],
)

@rafi-kamal
Copy link
Contributor

Do you want me to create a PR with this rule?

Note that we freezed the master branch until the next release for Code Yellow (the release is going to happen sometime next week).

@ejona86
Copy link
Contributor

ejona86 commented Nov 13, 2019

@rafi-kamal, that would be really nice. But it would need to more closely match the cpp/java_toolchain and should really be tested at least once.

@liusheng
Copy link
Author

liusheng commented Nov 14, 2019

Hi @rafi-kamal @ejona86,
I previously tried building grpc-java-1.15.1 which dependends on the protoc-gen-javalite:3.0, as @ejona86 suggested in grpc/grpc-java#6364 (comment), I am trying to build the grpc-java latest release, which may won't have this issues, I am using gradle. so please feel free to closes this issues.

Thanks you :-)

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

3 participants