Skip to content

Commit

Permalink
Update Scala versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mdedetrich committed Mar 21, 2023
1 parent 33583e0 commit 732c4bf
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 3 additions & 11 deletions project/JdkOptions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -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", "-release", "8"))

private def selectOptions(
targetSystemJdk: Boolean,
Expand Down
2 changes: 1 addition & 1 deletion project/PekkoDisciplinePlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++= (
Expand Down
8 changes: 4 additions & 4 deletions scripts/link-validator.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down

0 comments on commit 732c4bf

Please sign in to comment.