Skip to content

Commit 860845b

Browse files
bump: scala 2.13.17 and 3.3.7 (#32825)
--------- Co-authored-by: Sebastian <[email protected]>
1 parent 7d6f763 commit 860845b

File tree

22 files changed

+63
-52
lines changed

22 files changed

+63
-52
lines changed

.github/workflows/check-samples.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ jobs:
1818
check-samples:
1919
name: Check Sample Projects
2020
runs-on: Akka-Default
21+
env:
22+
SCALA3_VERSION: 3.3.7
23+
2124
steps:
2225
- name: Checkout Global Scripts
2326
# This MUST be before the main checkout or else the dynver will not work
@@ -77,7 +80,7 @@ jobs:
7780
run: |-
7881
cd samples/akka-quickstart-scala
7982
sbt test -Dakka.version=`cat ~/.version`
80-
sbt 'clean; ++3.3.3!; test' -Dakka.version=`cat ~/.version`
83+
sbt "clean; ++${SCALA3_VERSION}!; test" -Dakka.version=`cat ~/.version`
8184
8285
- name: Test akka-sample-cluster-java
8386
run: |-
@@ -88,7 +91,7 @@ jobs:
8891
run: |-
8992
cd samples/akka-sample-cluster-scala
9093
sbt test -Dakka.version=`cat ~/.version`
91-
sbt 'clean; ++3.3.3!; test' -Dakka.version=`cat ~/.version`
94+
sbt "clean; ++${SCALA3_VERSION}!; test" -Dakka.version=`cat ~/.version`
9295
9396
- name: Test akka-sample-distributed-data-java
9497
run: |-
@@ -100,7 +103,7 @@ jobs:
100103
run: |-
101104
cd samples/akka-sample-distributed-data-scala
102105
sbt test multi-jvm:test -Dakka.version=`cat ~/.version`
103-
sbt 'clean; ++3.3.3!; test; multi-jvm:test' -Dakka.version=`cat ~/.version`
106+
sbt "clean; ++${SCALA3_VERSION}!; test; multi-jvm:test" -Dakka.version=`cat ~/.version`
104107
105108
- name: Test akka-sample-fsm-java
106109
run: |-
@@ -111,7 +114,7 @@ jobs:
111114
run: |-
112115
cd samples/akka-sample-fsm-scala
113116
sbt test -Dakka.version=`cat ~/.version`
114-
sbt 'clean; ++3.3.3!; test' -Dakka.version=`cat ~/.version`
117+
sbt "clean; ++${SCALA3_VERSION}!; test" -Dakka.version=`cat ~/.version`
115118
116119
- name: Test akka-sample-sharding-java
117120
run: |-
@@ -122,13 +125,13 @@ jobs:
122125
run: |-
123126
cd samples/akka-sample-sharding-scala
124127
sbt test -Dakka.version=`cat ~/.version`
125-
sbt 'clean; ++3.3.3!; test' -Dakka.version=`cat ~/.version`
128+
sbt "clean; ++${SCALA3_VERSION}!; test" -Dakka.version=`cat ~/.version`
126129
127130
- name: Test akka-sample-kafka-to-sharding-scala
128131
run: |-
129132
cd samples/akka-sample-kafka-to-sharding-scala
130133
sbt test -Dakka.version=`cat ~/.version`
131-
sbt 'clean; ++3.3.3!; test' -Dakka.version=`cat ~/.version`
134+
sbt "clean; ++${SCALA3_VERSION}!; test" -Dakka.version=`cat ~/.version`
132135
133136
- name: Email on failure
134137
if: ${{ failure() }}

akka-actor-tests/src/test/scala/akka/actor/ActorSystemSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ object ActorSystemSpec {
7777

7878
class SlowDispatcher(_config: Config, _prerequisites: DispatcherPrerequisites)
7979
extends MessageDispatcherConfigurator(_config, _prerequisites) {
80-
private val instance = new Dispatcher(
80+
private val instance: Dispatcher = new Dispatcher(
8181
this,
8282
this.config.getString("id"),
8383
this.config.getInt("throughput"),

akka-actor-tests/src/test/scala/akka/event/LoggingReceiveSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class LoggingReceiveSpec extends AnyWordSpec with BeforeAndAfterAll {
9393
case null =>
9494
}
9595

96-
val actor = TestActorRef(new Actor {
96+
val actor: TestActorRef[Actor] = TestActorRef(new Actor {
9797
def switch: Actor.Receive = { case "becomenull" => context.become(r, false) }
9898
def receive =
9999
switch.orElse(LoggingReceive {

akka-actor-typed/src/main/scala/akka/actor/typed/internal/adapter/PropsAdapter.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,15 @@ import akka.actor.typed.internal.PropsImpl._
1616
import akka.annotation.InternalApi
1717
import akka.dispatch.Mailboxes
1818

19+
import scala.annotation.nowarn
20+
1921
/**
2022
* INTERNAL API
2123
*/
2224
@InternalApi private[akka] object PropsAdapter {
2325

2426
private final val TypedCreatorFunctionConsumerClazz = classOf[TypedCreatorFunctionConsumer]
27+
@nowarn("msg=never used")
2528
private final val ActorAdapterClazz = classOf[ActorAdapter[_]]
2629
private final val DefaultTypedDeploy = Deploy.local.copy(mailbox = "akka.actor.typed.default-mailbox")
2730

akka-actor/src/main/scala-2.13/akka/util/ByteString.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ object ByteString {
361361
}
362362

363363
def compact: CompactByteString =
364-
if (isCompact) ByteString1C(bytes) else ByteString1C(toArray)
364+
if (isCompact) ByteString1C(bytes) else ByteString1C(toArray())
365365

366366
def asByteBuffer: ByteBuffer = {
367367
val buffer = ByteBuffer.wrap(bytes, startIndex, length).asReadOnlyBuffer
@@ -441,7 +441,7 @@ object ByteString {
441441

442442
override def toArrayUnsafe(): Array[Byte] = {
443443
if (startIndex == 0 && length == bytes.length) bytes
444-
else toArray
444+
else toArray()
445445
}
446446
}
447447

@@ -833,7 +833,7 @@ sealed abstract class ByteString
833833
*
834834
* @return this ByteString copied into a byte array
835835
*/
836-
protected[ByteString] def toArray: Array[Byte] = toArray[Byte]
836+
protected[ByteString] def toArray(): Array[Byte] = toArray[Byte]
837837

838838
final override def toArray[B >: Byte](implicit arg0: ClassTag[B]): Array[B] = {
839839
// super uses byteiterator
@@ -869,7 +869,7 @@ sealed abstract class ByteString
869869
* only read the bytes and never mutate then. For all other intents and purposes, please use the usual
870870
* toArray method - which provide the immutability guarantees by copying the backing array.
871871
*/
872-
def toArrayUnsafe(): Array[Byte] = toArray
872+
def toArrayUnsafe(): Array[Byte] = toArray()
873873

874874
override def foreach[@specialized U](f: Byte => U): Unit = iterator.foreach(f)
875875

@@ -932,7 +932,7 @@ sealed abstract class ByteString
932932
* Creates a new ByteBuffer with a copy of all bytes contained in this
933933
* ByteString.
934934
*/
935-
def toByteBuffer: ByteBuffer = ByteBuffer.wrap(toArray)
935+
def toByteBuffer: ByteBuffer = ByteBuffer.wrap(toArray())
936936

937937
/**
938938
* Decodes this ByteString as a UTF-8 encoded String.

akka-actor/src/main/scala/akka/actor/Address.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import java.net.MalformedURLException
77
import java.net.URI
88
import java.net.URISyntaxException
99
import java.util.Optional
10-
1110
import scala.annotation.tailrec
1211
import scala.collection.immutable
1312
import scala.jdk.OptionConverters._
14-
1513
import akka.annotation.InternalApi
1614

15+
import scala.annotation.nowarn
16+
1717
/**
1818
* The address specifies the physical location under which an Actor can be
1919
* reached. Examples are local addresses, identified by the ActorSystem’s
@@ -65,8 +65,8 @@ final case class Address private[akka] (protocol: String, system: String, host:
6565
* entity.
6666
*/
6767
def hasGlobalScope: Boolean = host.isDefined
68-
6968
// store hashCode
69+
@nowarn("msg=deprecated")
7070
@transient override lazy val hashCode: Int = scala.util.hashing.MurmurHash3.productHash(this)
7171

7272
/**

akka-actor/src/main/scala/akka/routing/RouterConfig.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ trait RouterConfig extends Serializable {
8181
/**
8282
* Overridable merge strategy, by default completely prefers `this` (i.e. no merge).
8383
*/
84-
def withFallback(@nowarn("msg=never used") other: RouterConfig): RouterConfig = this
84+
def withFallback(other: RouterConfig): RouterConfig = this
8585

8686
/**
8787
* Check that everything is there which is needed. Called in constructor of RoutedActorRef to fail early.

akka-docs/src/test/scala/docs/persistence/testkit/TestKitExamples.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ object PersistenceTestKitSampleSpec {
2222
val empty: State = new State
2323
}
2424
final class State extends CborSerializable {
25-
@nowarn("msg=never used")
2625
def updated(event: Evt): State = this
2726
}
2827
}

akka-persistence-testkit/src/main/scala/akka/persistence/testkit/internal/Unpersistent.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ private[akka] object Unpersistent {
109109

110110
private var sequenceNr: Long = initialSequenceNr
111111
private var state: State = initialState
112-
private var metadata: Option[Any] = None
112+
private var metadataState: Option[Any] = None
113113
private val stashedCommands = ListBuffer.empty[Command]
114114

115115
private def snapshotMetadata() =
@@ -143,7 +143,7 @@ private[akka] object Unpersistent {
143143

144144
case Persist(event, metadataEntries) =>
145145
sequenceNr += 1
146-
metadata = if (metadataEntries.isEmpty) None else Some(CompositeMetadata(metadataEntries))
146+
metadataState = if (metadataEntries.isEmpty) None else Some(CompositeMetadata(metadataEntries))
147147
state = eventHandler(state, event)
148148
onEvent(event, sequenceNr, tagger(state, event))
149149
shouldSnapshot = shouldSnapshot || snapshotRequested(event)
@@ -155,7 +155,7 @@ private[akka] object Unpersistent {
155155
val event = evtWithMeta.event
156156
val metadataEntries = evtWithMeta.metadataEntries
157157
sequenceNr += 1
158-
metadata = if (metadataEntries.isEmpty) None else Some(CompositeMetadata(metadataEntries))
158+
metadataState = if (metadataEntries.isEmpty) None else Some(CompositeMetadata(metadataEntries))
159159
state = eventHandler(state, event)
160160
val tags = tagger(state, event)
161161
(event, sequenceNr, tags)
@@ -219,7 +219,7 @@ private[akka] object Unpersistent {
219219
}
220220

221221
override def metadata[M: ClassTag]: Option[M] =
222-
CompositeMetadata.extract[M](metadata)
222+
CompositeMetadata.extract[M](metadataState)
223223
}
224224

225225
private class WrappedDurableStateBehavior[Command, State](

akka-persistence/src/main/scala/akka/persistence/Eventsourced.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ private[persistence] trait Eventsourced
667667
* @param replayMax maximum number of messages to replay.
668668
* @param timeout recovery event timeout
669669
*/
670-
private def recoveryStarted(replayMax: Long, timeout: FiniteDuration) = new State {
670+
private def recoveryStarted(replayMax: Long, timeout: FiniteDuration): State = new State {
671671

672672
val timeoutCancellable = {
673673
import context.dispatcher
@@ -783,7 +783,7 @@ private[persistence] trait Eventsourced
783783
*
784784
* All incoming messages are stashed.
785785
*/
786-
private def recovering(recoveryBehavior: Receive, timeout: FiniteDuration) =
786+
private def recovering(recoveryBehavior: Receive, timeout: FiniteDuration): State =
787787
new State {
788788

789789
// protect against snapshot stalling forever because of journal overloaded and such

0 commit comments

Comments
 (0)