-
Notifications
You must be signed in to change notification settings - Fork 153
Cross-build (most projects) for Scala 2.12.0 #253
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
Conversation
It looks like I need to add logic to not register |
| k.register(boxedUnit.getClass, new SingletonSerializer(boxedUnit)) | ||
| PackageRegistrar.all()(k) | ||
|
|
||
| // Enable Java 8 lambda serialization only if we are running on a Java 8 JRE: |
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.
Quick question: what's the best place to register this? And what happens if it already happens to have been registered by some other means?
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 think we should make a Java8ClosureRegistrar that is an IKryoRegistrar: https://github.com/twitter/chill/blob/develop/chill-java/src/main/java/com/twitter/chill/IKryoRegistrar.java and it should be a no-op when we are not on java8 (as you have below).
See for instance the PackageRegistrar.all() above.
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.
Good idea; will do.
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.
Whoops, forgot about this comment until now. I've created a Java8ClosureRegistrar to abstract away this code.
|
looks great. I don't want to merge pointing to a |
See https://issues.scala-lang.org/browse/SI-6710 for context. This is necessary for Scala 2.12.0-M5.
|
|
||
| // use the singleton serializer for boxed Unit | ||
| val boxedUnit = scala.Unit.box(()) | ||
| val boxedUnit = scala.runtime.BoxedUnit.UNIT |
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.
this won't be necessary in M5, fixed in scala/scala#5100
|
do you have any interest in this still? The PR was red, and I didn't look into it much till now. It looks like it may have been a transient error with Travis. I restarted it. |
|
if you can merge with develop and bump to a non-snapshot version of kryo 3.x.y I'll merge this. |
|
I think kryo 3.1 is required as it solves an issue with registering closure serializers (EsotericSoftware/kryo#299). Unfortunately 3.1 was never released, and the project went straight ahead to 4.0.0. |
|
@johnynek Out of interest, is there anything holding you back to switch to kryo 4.0.0? |
|
So, sadly, many people against our recommendation have used kryo I'm happy to help merge and release chill for later Kryos (basically we So, I'm happy to make a new version of chill with the latest kryo.
|
|
Do you want to bump this up to 2.12.0? |
|
@johnynek Ok, I fully understand this. Thanks for taking the route to kryo 4! |
|
okay, merged #258. if you merge develop, I'll merge this. |
|
This is now passing tests and I think should be ready for a final review. Let me know if you'd like me to make any changes. |
|
LGTM, but let's wait on @johnynek for the final shipit. Once scala 2.12 ships do we have any plans to remove support for 2.10, or are we committed to three minor versions? |
|
Okay. This looks good. Let's merge this and this can be the 0.9.x branch for Kryo 4.x |
This patch allows several of the chill modules to be built for Scala 2.12.0.
Several subprojects, such as
chill-akkaandchill-bijection, cannot currently be published for 2.12 because their dependencies have not been published yet. To work around this, I used thesbt-dogeplugin, which overrides++and+to respect subprojects'crossScalaVersionssettings, allowing you to runto test and publish for all Scala versions.
Refs #252.