-
Notifications
You must be signed in to change notification settings - Fork 267
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
Update to scala 2.13 and akka 2.6 (incremental) #1390
Conversation
eclair-core/src/main/scala/fr/acinq/eclair/payment/relay/ChannelRelayer.scala
Show resolved
Hide resolved
@@ -132,16 +132,12 @@ | |||
<version>3.4.2</version> | |||
<configuration> | |||
<args combine.children="append"> | |||
<arg>-deprecation</arg> | |||
<!--arg>-Xlint:deprecation</arg--> |
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.
Maybe create a tracking issue to revert that back in the future (once all warnings are fixed)?
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.
The reason why I'm not fixing the warning is that it would break source compatibility with scala 2.11.
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.
Agreed, but we probably want to get rid of it "at some point" (once the android
branch is gone), just want to make sure we don't forget it (we're not looking at the pom very often to be honest)
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.
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.
Done with #1393.
@@ -174,6 +174,7 @@ package object eclair { | |||
override def toFloat(x: MilliSatoshi): Float = x.toLong | |||
override def toDouble(x: MilliSatoshi): Double = x.toLong | |||
override def compare(x: MilliSatoshi, y: MilliSatoshi): Int = x.compare(y) | |||
override def parseString(str: String): Option[MilliSatoshi] = ??? |
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 don't think it's a problem to leave this unimplemented.
<dependency> | ||
<groupId>org.scala-lang.modules</groupId> | ||
<artifactId>scala-collection-contrib_${scala.version.short}</artifactId> | ||
<version>0.2.1</version> | ||
</dependency> |
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 is required for MultiDict because MultiMap has been removed.
45d35b7
to
3213dda
Compare
Rebased. |
.travis.yml
Outdated
@@ -4,7 +4,7 @@ services: | |||
dist: trusty | |||
language: scala | |||
scala: | |||
- 2.11.12 | |||
- 2.13.1 |
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.
Why not even 2.13.2? #reckless?
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.
Nice catch. Main pom.xml was also using 2.13.1. Fixed in ed5f7c7.
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.
LGTM
This is almost a drop-in replacement. I had to relaxed compiler parameters to allow deprecated features though. Main changes: - relaxed compiler parameters to minimize impact (e.g. allow deprecated features) - `scala.collection.JavaConverters` -> `scala.jdk.CollectionConverters` - `MultiMap` -> `MultiDict` Compilation is 25% faster on my machine, compiler is a bit more strict (it found an "invalid comparison" bug).
ed5f7c7
to
b8f7d84
Compare
Rebased. |
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 builds on #1389, so the changeset is minimal (disregard the first commit).
Main changes:
deprecated features)
scala.collection.JavaConverters
->scala.jdk.CollectionConverters
MultiMap
->MultiDict
Compilation is 25% faster on my machine, compiler is a bit more strict
(it found an "invalid comparison" bug).