-
Notifications
You must be signed in to change notification settings - Fork 18
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
Generate scala code compliant with -Xsource:3
#307
Comments
We still support scala 2.12 so we will not be making scala3 style source the default. If someone finds a way to make this configurable - then we can go that route. |
I think in my case, its literally just adding type annotations to the generated scala code The non compliant //does not compile with `-Xsource:3`
lazy val values = scala.collection.immutable.Seq(LEGACY, ANCHOR) what //compiles with -Xsource:3 because `values` has the type annotation
lazy val values: Seq[wtclientrpc.PolicyType.Recognized] = scala.collection.immutable.Seq(LEGACY, ANCHOR) Now if I re-compile, removing the I know collections were redone in |
@Christewart this is a volunteer project. Noone works full time on it. If you would like to try a solution, we will review any PRs. |
pekko-grpc codegen is built on top of https://github.com/scalapb/ScalaPB and it is ScalaPB that generates the source for the |
ScalaPB recently added scalapb/ScalaPB@83b849f In the next few weeks, we should be releasing a 1.1.0-M1 version of pekko-grpc that uses the latest ScalaPB release |
closing - as we already have #222 |
https://pekko.apache.org/docs/pekko-grpc/current/buildtools/sbt.html#generating-server- With Pekko-GRPC 1.1 snapshots or releases, you should be able to add this to your sbt file.
|
I'm attempting to update my grpc project to use the
-Xsource:3
https://docs.scala-lang.org/scala3/guides/migration/tooling-scala2-xsource3.html
I can use
-quickfix:any
to re-write the generated scala code, however if I don't constantly keep-quickfix:any
in thescalacOptions
, the code will revert back to the non compliant-Xsource:3
after aclean
In bitcoin-s, the project that uses grpc is
lndRpc
. You can reproduce this by runninglndRpc/compile
bitcoin-s/bitcoin-s#5595
You can see the failures on CI here: https://github.com/bitcoin-s/bitcoin-s/actions/runs/9097285380/job/25004754803
The text was updated successfully, but these errors were encountered: