-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Cross-build to Scala 2.13 #40
Comments
akka-grpc 0.6.0+11-23237fc2 supports Scala 2.13.0-M5 |
blocked on lagom/lagom#1240 partial progress made in #79. |
Hi! Any progress in 2.13 support for play-grpc? |
Hi, any updates would be much appreciated :) |
play-grpc is now on lagom 1.6.0 which supports Scala 2.13, so that requirement is fulfilled. I think the way forward would be to start with master and adding cross-building there, perhaps taking inspiration from #79 (which is from a while back). Would you be interested in giving it a try? |
@raboof , thanks for your (very!) fast reply. I started working on that (was able to migrate |
@matankdr play-grpc consists of code generation utilities and a runtime library. Since the code generation is done in the build tool (typically sbt, which is on Scala 2.12), I think the code generation code itself doesn't need to be ported to 2.13 yet. To use play-grpc in a Scala 2.13 project, we have to make sure the generated code is 2.13-compatible (I think it probably is, or perhaps only needs minor changes) and make sure the runtime library is available on 2.13. This is similar to the Akka gRPC project: most resources are built only for Scala 2.12 (e.g. https://github.com/akka/akka-grpc/blob/master/build.sbt#L102), but the runtime library is built for both 2.12 and 2.13 (https://github.com/akka/akka-grpc/blob/master/project/Common.scala#L72). Great that you are interested in having a look at this! Feel free to let us know if you have anything in-progress, even if unfinished. Setting up cross-building in sbt can be a challenge sometimes... |
@raboof is it not just to add these lines of code and publish because I have seen you made the necessary update to akka grpc and scalapb: lazy val scala212 = "2.12.10"
lazy val scala213 = "2.13.1"
lazy val supportedScalaVersions = List(scala212, scala213)
val playRuntime = Project("play-grpc-runtime", file("play-runtime"))
.settings(
libraryDependencies ++= Seq(
Dependencies.Compile.akkaGrpcRuntime,
Dependencies.Compile.play,
Dependencies.Compile.playAkkaHttpServer,
Dependencies.Compile.akkaDiscovery,
),
crossScalaVersions := supportedScalaVersions,
)
val playGenerators = Project("play-grpc-generators", file("play-generators"))
.enablePlugins(SbtTwirl, BuildInfoPlugin)
.settings(
libraryDependencies ++= Seq(
Dependencies.Compile.akkaGrpcCodegen,
Dependencies.Test.scalaTest,
),
crossScalaVersions := supportedScalaVersions,
) |
@raboof When I tried this #40 (comment) I got the following error message:
Forgive me I am still finding my feet with sbt. |
@raboof In the travis file in your PR don't you think we need to add this line for the scala 2.13
|
@raboof Also when I pullded it and cross compile it locally I got this error:
|
That could be a nice improvement in this case indeed, though now it already tests 2.13 with '++'
Ah, good one, I broke 2.12 while fixing 2.13 ;). Should be OK for both now. |
@raboof The build is ok now. Is there a way for me to access the snapshot and tried it on my project while waiting for the official release? |
We don't currently publish snapshots, but if you 'publishLocal' you might be able to build some for yourself? |
@raboof Yeah I tried run this:
However I am getting some javadocs errors:
|
Ah, that flag is only available on jdk11 - and in retrospect should not be needed. Can you try again? |
@raboof It did work like magic. So I will fork your branch and push it onto our private artifactory. So when you guys officialy release it then I will just switch. |
@raboof Quick one I think we can also silence some of the unused import message of sbt |
* Cross-build to Scala 2.13 #40 * formatting * Fix JavaAkkaGrpcClientHelpers on 2.12 * --ignore-source-errors not needed after all and is jdk11-only
Resolved in #228 |
Direct upstream blockers:
The text was updated successfully, but these errors were encountered: