-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Test support for stubs compiled with Scala 3 & publish codegen for Scala 3 #123
Conversation
@@ -1,6 +1,6 @@ | |||
addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.4") | |||
|
|||
libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.11.1" | |||
libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.11.4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test updates * refined uses macro that are not available in Scala 3 * type of implicit definition needs to be given explicitly * customize "implicit not found" error message
@@ -32,7 +32,7 @@ inThisBuild( | |||
|
|||
val pgvVersion = "0.4.1" | |||
val munitSettings = Seq( | |||
libraryDependencies += "org.scalameta" %% "munit" % "0.7.25" % Test, | |||
libraryDependencies += "org.scalameta" %% "munit" % "0.7.26" % Test, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// avoids "Not found: type UnusedPrivateParameter" in scalapb/scalapb/validate/Validate.java with Scala 3 | ||
Compile / compileOrder := CompileOrder.JavaThenScala |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like bug in dotty. Without this:
[info] compiling 19 Scala sources and 3 Java sources to /home/bjaglin/git/projects/scalapb-validate/code-gen/target/jvm-3/classes ...
[error] -- [E006] Not Found Error: /home/bjaglin/git/projects/scalapb-validate/code-gen/target/jvm-3/src_managed/main/scalapb/scalapb/validate/Validate.java:152:8
[error] 152 | UnusedPrivateParameter unused) {
[error] | ^^^^^^^^^^^^^^^^^^^^^^
[error] | Not found: type UnusedPrivateParameter
[error] -- [E006] Not Found Error: /home/bjaglin/git/projects/scalapb-validate/code-gen/target/jvm-3/src_managed/main/scalapb/scalapb/validate/Validate.java:1209:8
[error] 1209 | UnusedPrivateParameter unused) {
[error] | ^^^^^^^^^^^^^^^^^^^^^^
[error] | Not found: type UnusedPrivateParameter
[error] -- [E006] Not Found Error: /home/bjaglin/git/projects/scalapb-validate/code-gen/target/jvm-3/src_managed/main/scalapb/scalapb/validate/Validate.java:1834:8
[error] 1834 | UnusedPrivateParameter unused) {
[error] | ^^^^^^^^^^^^^^^^^^^^^^
[error] | Not found: type UnusedPrivateParameter
[error] -- [E006] Not Found Error: /home/bjaglin/git/projects/scalapb-validate/code-gen/target/jvm-3/src_managed/main/scalapb/scalapb/validate/Validate.java:2386:8
[error] 2386 | UnusedPrivateParameter unused) {
[error] | ^^^^^^^^^^^^^^^^^^^^^^
[error] | Not found: type UnusedPrivateParameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this static inner class is a recurring source of problems scala/bug#9111 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like ScalaPB went this way as well to workaround the issue scalapb/ScalaPB@c4f9ce9#diff-dd3701b993fcc974a9a6d017159aac00d4b41bcd05ad319815c6001311c669d5R66
Thanks, this got in via 03da6a7 |
No description provided.