diff --git a/actor/src/main/scala/org/apache/pekko/actor/dungeon/Children.scala b/actor/src/main/scala/org/apache/pekko/actor/dungeon/Children.scala index 36feaf8e812..b690ea9456c 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/dungeon/Children.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/dungeon/Children.scala @@ -33,7 +33,7 @@ private[pekko] trait Children { this: ActorCell => import ChildrenContainer._ - @nowarn("msg=never used") + @nowarn("msg=never used|is never updated") @volatile private var _childrenRefsDoNotCallMeDirectly: ChildrenContainer = EmptyChildrenContainer diff --git a/actor/src/main/scala/org/apache/pekko/pattern/AskSupport.scala b/actor/src/main/scala/org/apache/pekko/pattern/AskSupport.scala index e5a12abca17..db13aecd7ac 100644 --- a/actor/src/main/scala/org/apache/pekko/pattern/AskSupport.scala +++ b/actor/src/main/scala/org/apache/pekko/pattern/AskSupport.scala @@ -537,11 +537,11 @@ private[pekko] final class PromiseActorRef( * Stopped => stopped, path not yet created */ @volatile - @nowarn("msg=never used") + @nowarn("msg=is never updated") private[this] var _stateDoNotCallMeDirectly: AnyRef = _ @volatile - @nowarn("msg=never used") + @nowarn("msg=is never updated") private[this] var _watchedByDoNotCallMeDirectly: Set[ActorRef] = ActorCell.emptyActorRefSet @nowarn private def _preventPrivateUnusedErasure = { diff --git a/actor/src/main/scala/org/apache/pekko/pattern/CircuitBreaker.scala b/actor/src/main/scala/org/apache/pekko/pattern/CircuitBreaker.scala index f848b068e09..00ae9a65664 100644 --- a/actor/src/main/scala/org/apache/pekko/pattern/CircuitBreaker.scala +++ b/actor/src/main/scala/org/apache/pekko/pattern/CircuitBreaker.scala @@ -294,12 +294,14 @@ class CircuitBreaker( /** * Holds reference to current state of CircuitBreaker - *access only via helper methods* */ + @nowarn("msg=is never updated") @volatile private[this] var _currentStateDoNotCallMeDirectly: State = Closed /** * Holds reference to current resetTimeout of CircuitBreaker - *access only via helper methods* */ + @nowarn("msg=is never updated") @volatile private[this] var _currentResetTimeoutDoNotCallMeDirectly: FiniteDuration = resetTimeout diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 03c02c4ee84..ecf1b1d40c5 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -50,8 +50,8 @@ object Dependencies { } } - val scala212Version = "2.12.16" - val scala213Version = "2.13.8" + val scala212Version = "2.12.17" + val scala213Version = "2.13.10" // To get the fix for https://github.com/lampepfl/dotty/issues/13106 // and restored static forwarders val scala3Version = "3.1.2" diff --git a/project/JdkOptions.scala b/project/JdkOptions.scala index 25d4076552a..cab806a78b7 100644 --- a/project/JdkOptions.scala +++ b/project/JdkOptions.scala @@ -57,14 +57,8 @@ object JdkOptions extends AutoPlugin { targetSystemJdk, jdk8home, fullJavaHomes, - Seq(if (scalaVersion.startsWith("3.")) "-Xtarget:8" else "-target:jvm-1.8"), - // '-release 8' is not enough, for some reason we need the 8 rt.jar - // explicitly. To test whether this has the desired effect, compile - // pekko-remote and check the invocation of 'ByteBuffer.clear()' in - // EnvelopeBuffer.class with 'javap -c': it should refer to - // ""java/nio/ByteBuffer.clear:()Ljava/nio/Buffer" and not - // "java/nio/ByteBuffer.clear:()Ljava/nio/ByteBuffer". Issue #27079 - (java8home: File) => Seq("-release", "8", "-javabootclasspath", java8home + "/jre/lib/rt.jar")) + Seq(if (scalaVersion.startsWith("3.")) "-Xtarget:8" else "release:8"), + (java8home: File) => Seq("-release", "8")) def targetJdkJavacOptions( targetSystemJdk: Boolean, jdk8home: Option[File], @@ -74,9 +68,7 @@ object JdkOptions extends AutoPlugin { jdk8home, fullJavaHomes, Nil, - // '-release 8' would be a neater option here, but is currently not an - // option because it doesn't provide access to `sun.misc.Unsafe` #27079 - (java8home: File) => Seq("-source", "8", "-target", "8", "-bootclasspath", java8home + "/jre/lib/rt.jar")) + (java8home: File) => Seq("-source", "8", "-target", "8")) private def selectOptions( targetSystemJdk: Boolean, diff --git a/project/PekkoDisciplinePlugin.scala b/project/PekkoDisciplinePlugin.scala index d0656ef101c..6a9c3b8af6d 100644 --- a/project/PekkoDisciplinePlugin.scala +++ b/project/PekkoDisciplinePlugin.scala @@ -76,7 +76,7 @@ object PekkoDisciplinePlugin extends AutoPlugin { "pekko-stream-tests-tck", "pekko-testkit") - val defaultScalaOptions = "-Wconf:cat=unused-nowarn:s,any:e" + val defaultScalaOptions = "-Wconf:cat=unused-nowarn:s,cat=lint-infer-any:s,any:e" lazy val nowarnSettings = Seq( Compile / scalacOptions ++= ( diff --git a/scripts/link-validator.conf b/scripts/link-validator.conf index e19b92125a1..65dc4aa9fe4 100644 --- a/scripts/link-validator.conf +++ b/scripts/link-validator.conf @@ -46,10 +46,10 @@ site-link-validator { "https://javadoc.io/static/" # GitHub will block with "429 Too Many Requests" "https://github.com/" - "https://www.scala-lang.org/api/2.13.8/scala/runtime/AbstractFunction1.html" - "https://www.scala-lang.org/api/2.13.8/scala/runtime/AbstractFunction2.html" - "https://www.scala-lang.org/api/2.13.8/scala/runtime/AbstractFunction3.html" - "https://www.scala-lang.org/api/2.13.8/scala/runtime/AbstractPartialFunction.html" + "https://www.scala-lang.org/api/2.13.10/scala/runtime/AbstractFunction1.html" + "https://www.scala-lang.org/api/2.13.10/scala/runtime/AbstractFunction2.html" + "https://www.scala-lang.org/api/2.13.10/scala/runtime/AbstractFunction3.html" + "https://www.scala-lang.org/api/2.13.10/scala/runtime/AbstractPartialFunction.html" ] non-https-whitelist = [