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

Bazel Support is missing documentation on README and website #10215

Closed
vorburger opened this issue May 24, 2023 · 4 comments · Fixed by #10217
Closed

Bazel Support is missing documentation on README and website #10215

vorburger opened this issue May 24, 2023 · 4 comments · Fixed by #10217
Labels

Comments

@vorburger
Copy link
Contributor

What version of gRPC-Java are you using?

master

What is your environment?

Linux Java 11

What did you expect to see?

Looking at https://github.com/grpc/grpc-java/blob/master/README.md and/or https://grpc.io I was hoping to see documentation which describes (copy/pasta!) how to use grpc-java in a project which uses Bazel as its build system (just like it does for Maven and Gradle), which I would like to do for enola-dev/enola#202.

What did you see instead?

No documentation for Bazel.

I did find https://grpc.io/blog/bazel-rules-protobuf/ from 6.5 years ago, and was pointed to this example, and will try to use that (and sources) as inspiration.

I will see if I can contribute to this project with a docs PR once I have successfully learnt how to do this for enola-dev/enola#202.

I suggest to document the current as-is state, that is, without e.g. possible future #9559 (yet, update for that later).

My personal interest and focus for a contribution is non-Android, so I won't look at #4465.

/Cc @lowasser @ejona86

@vorburger
Copy link
Contributor Author

This documentation should ideally clarify how using java_proto_library and java_grpc_library relates to the proto_library from https://github.com/bazelbuild/rules_proto and https://bazel.build/reference/be/protocol-buffer... for the naive uniiniated it's not super clear.

@vorburger
Copy link
Contributor Author

What #10217 does not address is how exactly to use http_archive to load("@io_grpc_grpc_java// ...)"

In my enola-dev/enola#202 it only works because I'm still partially using https://rules-proto-grpc.com.

@ejona86
Copy link
Member

ejona86 commented May 25, 2023

Bazel users are vastly outnumbered by Maven/Gradle users, so yeah, the docs aren't optimized for it. Configuring the WORKSPACE is also some effort, so the best docs right now are indeed "look at the example."

But it is true that Bazel users may not be aware of the conventions for making proto_library/java_proto_library/java_grpc_library, so it would be appropriate to show that pattern somewhere other than a big BUILD file.

@larry-safran
Copy link
Contributor

larry-safran pushed a commit that referenced this issue May 26, 2023
…0217)

* docs: Document use with Bazel, like Maven & Gradle (fixes #10215)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants