-
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
[scala3] Enable scala3_sources #222
Conversation
@kczulko will this break on our Scala 2.12 build? |
I don't think so. We're using both scala2 and scala3 in our project (the same code is being compiled twice, due to moving-to-scala3 refactoring process...). I've been checking this via |
My gut feeling is that this should be targeting 1.1.x, @pjfanning wdyt? |
it doesn't yet work - it seems to break on Scala 2.12 as I suspected it might https://github.com/apache/incubator-pekko-grpc/actions/runs/7797963372/job/21265803687?pr=222
|
Probably need to pass some flags to |
The errors are coming from java files. For now I don't get it what could cause this issue. Do you have some suggestions? |
So that file is generated by googles own protobuf compiler so you shouldn't even manually be modifying it. Maybe we need to update the google protobuf compiler as well? |
As I'm bumping the scalapb compilerplugin I suspect the incompatibility may be here? https://github.com/scalapb/ScalaPB/blob/71befffd3db412d158fabb807ded56920fa0030f/project/Dependencies.scala#L7 |
yes - a big bump in io.grpc libs causes us issues - eg #190 |
@pjfanning Next thing - I don't know why |
The Link Validator tests are very brittle. It calls all the linked sites and many of them fail on occasion. |
@mdedetrich is it ok to remove the compatibility test that is failing and log a new issue to replace it? grpc refactored the javascript support and the test needs to be rewritten or replaced if we want to upgrade grpc libs. |
@pjfanning @mdedetrich Thanks in advance, |
since this is an sbt integration test, I think it's OK if there's some prerequisites for running it (such as putting |
Ok then. Let me try to do it. I'll use this gh action together with this go install command. However, I'm not allowed to check how this will work under github actions env since contributors have to wait for the CI run approval. Therefore I'd like to ask you (the contributors) to eventually fix all the shortcomings (as you can probably do it without waiting for approvals). Best regards, |
package org.apache.pekko.grpc.gen.scaladsl | ||
|
||
private[scaladsl] class ScalaCompatConstants(emitScala3Sources: Boolean = false) { | ||
// val WildcardType: String = if (emitScala3Sources) "?" else "_" |
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.
I guess this can be dropped
new PekkoDiscoveryNameResolver(discovery, defaultPort, targetUri.getAuthority, portName, protocol, resolveTimeout) | ||
} | ||
override def newNameResolver(targetUri: URI, args: NameResolver.Args): PekkoDiscoveryNameResolver = | ||
new PekkoDiscoveryNameResolver(discovery, defaultPort, serviceName, portName, protocol, resolveTimeout) |
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.
Is this change related/required for the switch to the new io.grpc version and introduction of scala3_sources?
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 authority
is no longer passed when newNameResolver
is called.
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.
Hmm, that is slightly scary (I assume the assert was there for a reason), but if you're confident this is a correct fix then 👍
# under the License. | ||
|
||
# Upgrade to io.grpc 1.60 caused this bin compat issue | ||
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.grpc.internal.PekkoDiscoveryNameResolverProvider.this") |
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.
👍 since internal
@@ -184,8 +183,7 @@ class NonBalancingIntegrationSpec(backend: String) | |||
|
|||
val failure = | |||
client.sayHello(HelloRequest(s"Hello friend")).failed.futureValue.asInstanceOf[StatusRuntimeException] | |||
failure.getStatus.getCode should be(Code.UNAVAILABLE) | |||
client.closed.failed.futureValue shouldBe a[ClientConnectionException] | |||
failure.getStatus.getCode should (equal(Code.UNKNOWN).or(equal(Code.UNAVAILABLE))) |
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.
strange but no problem
Great work here! I'm confused why the |
Seq(Compile, Test).flatMap(inConfig(_)(PB.targets += PB.gens.js -> resourceManaged.value / "js")) | ||
Seq(Compile, Test).flatMap(inConfig(_)( | ||
Seq( | ||
PB.targets += PB.gens.go -> resourceManaged.value / "go"))) |
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.
Should the ProtocJSPlugin
object renamed to something ProtocGoPlugin
?
the GHA error seems to be 'every step must define a |
I think that error is caused by the
|
ah, indeed, sharp eyes! |
with: | ||
go-version: '^1.20' | ||
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.32.0 | ||
|
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.
Ah looks like we have to split this into two: "a step cannot have both the uses
and run
keys"
Dear Lord... I think it's ok now :D |
It seems the link validator isn't wrong here, and the license report is linking to http://www.jetbrains.org for a new |
This PR attempts to enable
scala3_sources
scalapb option which is described here.