btlines / grpcmonix Goto Github PK
View Code? Open in Web Editor NEWUse Monix's Observable with GRPC services
License: MIT License
Use Monix's Observable with GRPC services
License: MIT License
It would be nice to update to the version of monix in which this project is depending on. If there is not an actual plan to work on that, I can do it by myself.
Could you update grpcmonix to use scalapb v0.6.7 and sbt-protoc v0.99.13?
Great project by the way!
I get a build error when using gRPC Monix with ScalaPB 0.8.1:
❱ sbt clean compile
[info] Loading settings for project global-plugins from idea.sbt ...
[info] Loading global plugins from /Users/shane/.sbt/1.0/plugins
[info] Loading settings for project grpc-monix-sample-build from plugins.sbt ...
[info] Loading project definition from [...]/grpc-monix-sample/project
[info] Updating ProjectRef(uri("file:[...]/grpc-monix-sample/project/"), "grpc-monix-sample-build")...
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies.
[warn] Run 'evicted' to see detailed eviction warnings
[...]/grpc-monix-sample/build.sbt:21: error: Symbol 'type scalapb.compiler.DescriptorPimps' is missing from the classpath.
This symbol is required by 'class grpcmonix.generators.GrpcMonixGenerator'.
Make sure that type DescriptorPimps is in your classpath and check for conflicting dependencies with `-Ylog-classpath`.
A full rebuild may help if 'GrpcMonixGenerator.class' was compiled against an incompatible version of scalapb.compiler.
grpcmonix.generators.GrpcMonixGenerator() -> (sourceManaged in Compile).value
^
[error] Type error in expression
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
I've attached a minimal project that you can use to reproduce the above:
grpc-monix-minimal.zip
Setting ScalaPB's flatPackage
to true causes compilation of generated Scala source to fail:
PB.targets in Compile := Seq(
scalapb.gen(grpc = true, flatPackage = true) -> (sourceManaged in Compile).value,
grpcmonix.generators.GrpcMonixGenerator -> (sourceManaged in Compile).value
)
Sample error:
[error] /Users/shane/node/app/target/scala-2.12/src_managed/main/mu/node/api/user/UserGrpcMonix.scala:19: object SignUpRequest is not a member of package mu.node.user
[error] new Marshaller(mu.node.user.SignUpRequest),
[error] ^
This while compiling a file called user.proto
.
The current generated code for bindService
calls:
ServerServiceDefinition
.builder("the.name.of.the.Service")
...
While this works, it doesn't register the service in a way that the ProtoReflectionService
can see.
The generated code already has a ServiceDescriptor that properly describes the service:
val SERVICE: _root_.io.grpc.ServiceDescriptor = ...
If bindService
is changed to call this instead, reflection works:
ServerServiceDefinition
.builder(SERVICE)
...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.