Skip to content

Protobuf and gRPC Support #144

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

Closed
PranavSathy opened this issue Feb 19, 2017 · 10 comments
Closed

Protobuf and gRPC Support #144

PranavSathy opened this issue Feb 19, 2017 · 10 comments

Comments

@PranavSathy
Copy link

It would be awesome if there any way to support generating, compiling and linking in gRPC service definitions in Scala (using ScalaPB).

https://github.com/scalapb/ScalaPB

Is this something could be potentially incorporated into rules_scala?

@johnynek
Copy link
Contributor

Yes. It could be. You could see the Twitter Scrooge rules as examples of how you might do this.

@johnynek
Copy link
Contributor

johnynek commented Sep 2, 2017

@azymnis here is our protobuf/grpc issue. Can you comment here if you are working? I think we have someone at Stripe who will also chime in soon.

@johnynek johnynek changed the title gRPC Support Protobuf and gRPC Support Sep 2, 2017
@azymnis
Copy link
Contributor

azymnis commented Sep 3, 2017

@johnynek sure, I could pick this up this week. If anyone else has already done this though or they are close, let me know so we don't do double work

@azymnis
Copy link
Contributor

azymnis commented Sep 5, 2017

@johnynek @ittaiz here's an ugly way to do this. Bundle scalapb's spbc with rules_scala: https://github.com/scalapb/ScalaPB/releases

Then we can have a protopb_library that will call spbc on all proto_library targets that it depends on. Does that sound too terrible?

FWIW this seems to be the approach that bazel has taken internally with protobuf and grpc: https://github.com/bazelbuild/bazel/blob/master/third_party/protobuf/BUILD

@johnynek
Copy link
Contributor

johnynek commented Sep 5, 2017

yeah, that sounds right. I would call it scala_proto_library or something. You might want to check out:

https://github.com/bazelbuild/rules_scala/blob/master/twitter_scrooge/twitter_scrooge.bzl

to see how we did this with scrooge. To "bundle" we point to the jar (or binary if we really have to) that bazel can pull down and run.

@azymnis
Copy link
Contributor

azymnis commented Sep 25, 2017

I'll start working on this today. If anyone has picked this up already please speak up

@jxm-stripe
Copy link

I'd not call my work all that close, TBH, mainly due to major unfamiliarity with bazel concepts.

@azymnis
Copy link
Contributor

azymnis commented Sep 25, 2017

@jxm-stripe do you have a PR up?

@azymnis
Copy link
Contributor

azymnis commented Dec 10, 2018

@johnynek @ittaiz I think we can close this, right?

@ittaiz
Copy link
Contributor

ittaiz commented Dec 11, 2018

indeed. again thank you for your work!
btw, you might be interested in #650

@ittaiz ittaiz closed this as completed Dec 11, 2018
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

5 participants