-
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
use Pekko JavaConverter #403
base: main
Are you sure you want to change the base?
Conversation
pjfanning
commented
Nov 3, 2024
•
edited
Loading
edited
- just updated the 'runtime' module
- other modules don't necessarily have a dependency on pekko-actor module so can't use Pekko JavaConverter unless we add a dependency - I'd prefer not to do this
3a84211
to
59b2a09
Compare
IIRC think the only reason |
There is also the issue of having the jar dependency. I don't think we can add a jar dependency like scala-collection-compat in a patch release but we could do it in a minor release. The plus side to this PR is to avoid using deprecated classes in scala-library jar. |
I'm not sure we can't do it in a patch release but I have no problems having the next release be a minor release. I think I'd prefer adding a dependency on scala-collection-compat over adding a dependency on Pekko code marked 'internal API' - ideally we should be able to eventually replace it there as well. |
Another thing that is going on is the inliner is taking advantage of the source being manually there and hence its inlining the differences away, albeit I don't know whether this is actually creating a performance improvement or not as JDK might be inlining all hotspots anyways. There are also a couple of cases of some subtles differences to Obviously if we want to be ultra safe it makes sense to leave it as is, at least until 2.12 is dropped. Slick is also manually including the source for 2.12 for its own reasons. |
I'm neutral about this PR. We have used the Pekko JavaConverter in most of our modules and this is probably one of the few exceptions. I would prefer to use to the existing deprecated Scala JavaConverter than to introduce a dependency on scala-collection-compat. |
6e9cdd4
to
71ea016
Compare
@@ -27,6 +27,7 @@ import protocbridge.{ JvmGenerator, ProtocRunner, Target } | |||
import scalapb.ScalaPbCodeGenerator | |||
|
|||
import scala.beans.BeanProperty | |||
import scala.collection.JavaConverters._ |
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.
Were you meant to change this to import org.apache.pekko.util.ccompat.JavaConverters._
?
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.
In this module, that class is not found. I guess I could look into changing the build for this module to add a dependency on the pekko-actor lib.
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've repurposed this PR to only update the 'runtime' module
Update VersionSyncCheckPlugin.scala revert Update JavaCodeGenerator.scala revert more changes Update ServerReflectionImpl.scala revert more reorder imports more changes Update ProtocSpec.scala revert some changes
3116d37
to
f6ee996
Compare