This is an automated email from the ASF dual-hosted git repository.
hepin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko.git
The following commit(s) were added to refs/heads/main by this push:
new 008bdd5190 =sbt Upgrade to Scala 2.12.18 and 2.13.11.
008bdd5190 is described below
commit 008bdd519024689b7deeb095635bf52aaa38f3e1
Author: He-Pin <[email protected]>
AuthorDate: Sat May 27 14:31:35 2023 +0800
=sbt Upgrade to Scala 2.12.18 and 2.13.11.
---
.../sharding/passivation/HillClimbingAdmissionOptimizerSpec.scala | 4 ++--
docs/src/test/scala/docs/stream/cookbook/RecipeSplitter.scala | 2 +-
project/Dependencies.scala | 4 ++--
.../org/apache/pekko/remote/transport/netty/NettyTransport.scala | 7 +++----
4 files changed, 8 insertions(+), 9 deletions(-)
diff --git
a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/passivation/HillClimbingAdmissionOptimizerSpec.scala
b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/passivation/HillClimbingAdmissionOptimizerSpec.scala
index 591a159b0e..3728f50b62 100644
---
a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/passivation/HillClimbingAdmissionOptimizerSpec.scala
+++
b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/passivation/HillClimbingAdmissionOptimizerSpec.scala
@@ -50,7 +50,7 @@ class HillClimbingAdmissionOptimizerSpec extends AnyWordSpec
with Matchers {
val optimizer = create(initialStep = step, stepDecay = decay)
for (i <- 1 to 100) {
optimizer.recordPassive()
- if (i % 10 == 0) optimizer.calculateAdjustment() shouldBe
math.pow(decay, i / 10 - 1) * -step
+ if (i % 10 == 0) optimizer.calculateAdjustment() shouldBe
math.pow(decay, i.toDouble / 10 - 1) * -step
}
}
@@ -63,7 +63,7 @@ class HillClimbingAdmissionOptimizerSpec extends AnyWordSpec
with Matchers {
if (i > 40) optimizer.recordActive() else optimizer.recordPassive()
if (i % 10 == 0) {
val shift = if (i < 60) 1 else 6
- optimizer.calculateAdjustment() shouldBe math.pow(decay, i / 10 -
shift) * -step
+ optimizer.calculateAdjustment() shouldBe math.pow(decay, i.toDouble
/ 10 - shift) * -step
}
}
}
diff --git a/docs/src/test/scala/docs/stream/cookbook/RecipeSplitter.scala
b/docs/src/test/scala/docs/stream/cookbook/RecipeSplitter.scala
index eaf88e0bee..b2cadb1176 100644
--- a/docs/src/test/scala/docs/stream/cookbook/RecipeSplitter.scala
+++ b/docs/src/test/scala/docs/stream/cookbook/RecipeSplitter.scala
@@ -23,7 +23,7 @@ import org.scalatest.wordspec.AnyWordSpec
class RecipeSplitter extends AnyWordSpec with BeforeAndAfterAll with Matchers
with ScalaFutures {
- implicit val system = ActorSystem("Test")
+ implicit val system: ActorSystem = ActorSystem("Test")
"Splitter" should {
" simple split " in {
diff --git a/project/Dependencies.scala b/project/Dependencies.scala
index 6acb2f0c89..9a65730168 100644
--- a/project/Dependencies.scala
+++ b/project/Dependencies.scala
@@ -37,8 +37,8 @@ object Dependencies {
val jacksonCoreVersion = "2.14.3"
val jacksonDatabindVersion = jacksonCoreVersion
- val scala212Version = "2.12.17"
- val scala213Version = "2.13.10"
+ val scala212Version = "2.12.18"
+ val scala213Version = "2.13.11"
// To get the fix for https://github.com/lampepfl/dotty/issues/13106
// and restored static forwarders
val scala3Version = "3.3.0"
diff --git
a/remote/src/main/scala/org/apache/pekko/remote/transport/netty/NettyTransport.scala
b/remote/src/main/scala/org/apache/pekko/remote/transport/netty/NettyTransport.scala
index 0910dff146..dff4d25f84 100644
---
a/remote/src/main/scala/org/apache/pekko/remote/transport/netty/NettyTransport.scala
+++
b/remote/src/main/scala/org/apache/pekko/remote/transport/netty/NettyTransport.scala
@@ -21,6 +21,7 @@ import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.Executors
import java.util.concurrent.atomic.AtomicInteger
+import scala.annotation.nowarn
import scala.concurrent.ExecutionContext
import scala.concurrent.Future
import scala.concurrent.Promise
@@ -30,8 +31,8 @@ import scala.util.Try
import scala.util.control.NoStackTrace
import scala.util.control.NonFatal
-import scala.annotation.nowarn
import com.typesafe.config.Config
+import org.apache.pekko
import org.jboss.netty.bootstrap.Bootstrap
import org.jboss.netty.bootstrap.ClientBootstrap
import org.jboss.netty.bootstrap.ConnectionlessBootstrap
@@ -50,8 +51,6 @@ import
org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder
import org.jboss.netty.handler.codec.frame.LengthFieldPrepender
import org.jboss.netty.handler.ssl.SslHandler
import org.jboss.netty.util.HashedWheelTimer
-
-import org.apache.pekko
import pekko.ConfigurationException
import pekko.OnlyCauseStackTrace
import pekko.actor.ActorSystem
@@ -124,7 +123,6 @@ class NettyTransportExceptionNoStack(msg: String, cause:
Throwable)
class NettyTransportSettings(config: Config) {
import config._
-
import pekko.util.Helpers.ConfigOps
val EnableSsl: Boolean = getBoolean("enable-ssl")
@@ -318,6 +316,7 @@ private[transport] object NettyTransport {
// 4 bytes will be used to represent the frame length. Used by netty
LengthFieldPrepender downstream handler.
val FrameLengthFieldLength = 4
def gracefulClose(channel: Channel)(implicit ec: ExecutionContext): Unit = {
+ @nowarn("msg=deprecated")
def always(c: ChannelFuture) = NettyFutureBridge(c).recover { case _ =>
c.getChannel }
for {
_ <- always { channel.write(ChannelBuffers.buffer(0)) } // Force flush
by waiting on a final dummy write
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]