Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version = 3.11.1
runner.dialect = scala213
runner.dialect = scala213source3
project.git = true
style = defaultWithAlign
docstrings.style = Asterisk
Expand Down Expand Up @@ -72,3 +72,13 @@ rewriteTokens = {
"←": "<-"
}
project.layout = StandardConvention

rewrite.scala3.convertToNewSyntax = true
runner {
dialectOverride {
allowSignificantIndentation = false
allowAsForImportRename = false
allowStarWildcardImport = false
allowPostfixStarVarargSplices = false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ import java.lang.{ Long => JLong }
session.executeWrite(bound)
}

private def prepareUpdate(ps: PreparedStatement, s: Serialized, partitionNr: Long): Statement[_] = {
private def prepareUpdate(ps: PreparedStatement, s: Serialized, partitionNr: Long): Statement[?] = {
// primary key
ps.bind()
.setString("persistence_id", s.persistenceId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ import scala.util.{ Failure, Success, Try }
executeStatement(selectDeletedToQuery.bind(persistenceId).setExecutionProfileName(profile)).map(r =>
Option(r.one()).map(_.getLong("deleted_to")).getOrElse(0))

private def executeStatement(statement: Statement[_]): Future[AsyncResultSet] =
private def executeStatement(statement: Statement[?]): Future[AsyncResultSet] =
session.executeAsync(statement).asScala

}
Expand Down Expand Up @@ -129,7 +129,7 @@ import scala.util.{ Failure, Success, Try }
override def createLogicAndMaterializedValue(inheritedAttributes: Attributes): (GraphStageLogic, Control) = {
val logic = new TimerGraphStageLogic(shape) with OutHandler with StageLogging with Control {

override protected def logSource: Class[_] =
override protected def logSource: Class[?] =
classOf[EventsByPersistenceIdStage]

implicit def ec: ExecutionContext = materializer.executionContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ abstract class EventsByTagMultiJvmSpec

override def initialParticipants: Int = roles.size

@volatile private var cassandraContainer: CassandraContainer[_] = _
@volatile private var cassandraContainer: CassandraContainer[?] = _

"EventsByTag" must {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import scala.concurrent.duration._
import scala.util.control.NonFatal

object CassandraSpec {
def getCallerName(clazz: Class[_]): String = {
def getCallerName(clazz: Class[?]): String = {
val s = Thread.currentThread.getStackTrace
.map(_.getClassName)
.dropWhile(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ object CassandraIntegrationSpec {
def receiveCommand: Receive = {
case DeleteTo(sequenceNr) =>
deleteMessages(sequenceNr)
case payload: List[_] =>
case payload: List[?] =>
persistAll(payload)(handle)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class BrokenDeSerialization(override val system: ExtendedActorSystem) extends Ba
override def toBinary(o: AnyRef): Array[Byte] =
// I was serious with the class name
Array.emptyByteArray
override def fromBinary(bytes: Array[Byte], manifest: Option[Class[_]]): AnyRef =
override def fromBinary(bytes: Array[Byte], manifest: Option[Class[?]]): AnyRef =
throw new RuntimeException("I can't deserialize a single thing")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ object PersistAllSpec {
def receiveCommand: Receive = {
case DeleteTo(sequenceNr) =>
deleteMessages(sequenceNr)
case payload: List[_] =>
case payload: List[?] =>
persistAll(payload)(handle)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class TagWriterSpec
shutdown()

val fakePs: Future[PreparedStatement] = Future.successful(null)
val successfulWrite: Statement[_] => Future[Done] = _ => Future.successful(Done)
val successfulWrite: Statement[?] => Future[Done] = _ => Future.successful(Done)
val defaultSettings = TagWriterSettings(
maxBatchSize = 10,
flushInterval = 10.seconds,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ object ConfigurablePersistentActor {

val Key: EntityTypeKey[Event] = EntityTypeKey[Event]("configurable")

def init(settings: Settings, system: ActorSystem[_]): ActorRef[ShardingEnvelope[Event]] = {
def init(settings: Settings, system: ActorSystem[?]): ActorRef[ShardingEnvelope[Event]] = {
ClusterSharding(system).init(Entity(Key)(ctx => apply(settings, ctx.entityId)).withRole("write"))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ import scala.concurrent.duration._
import scala.reflect.ClassTag

class EventProcessorStream[Event: ClassTag](
system: ActorSystem[_],
system: ActorSystem[?],
executionContext: ExecutionContext,
eventProcessorId: String,
tag: String) {

protected val log: Logger = LoggerFactory.getLogger(getClass)
private implicit val sys: ActorSystem[_] = system
private implicit val sys: ActorSystem[?] = system
private implicit val ec: ExecutionContext = executionContext

private val session = CassandraSessionRegistry(system).sessionFor("pekko.persistence.cassandra")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ object ReadSide {
}

def apply(
system: ActorSystem[_],
system: ActorSystem[?],
topic: ActorRef[Topic.Command[ReadSideTopic.ReadSideMetrics]],
settings: Settings): Unit = {
system.log.info("Running {} processors", settings.nrProcessors)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ object ReadSideTopic {

final case class ReadSideMetrics(count: Long, maxValue: Long, p99: Long, p50: Long)

def init(context: ActorContext[_]): ActorRef[Topic.Command[ReadSideMetrics]] = {
def init(context: ActorContext[?]): ActorRef[Topic.Command[ReadSideMetrics]] = {
context.spawn(Topic[ReadSideMetrics]("read-side-metrics"), "read-side-metrics")
}

Expand Down
6 changes: 3 additions & 3 deletions project/CopyrightHeader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ trait CopyrightHeader extends AutoPlugin {

override def trigger: PluginTrigger = allRequirements

protected def headerMappingSettings: Seq[Def.Setting[_]] =
protected def headerMappingSettings: Seq[Def.Setting[?]] =
Seq(Compile, Test).flatMap { config =>
inConfig(config)(
Seq(
Expand All @@ -34,9 +34,9 @@ trait CopyrightHeader extends AutoPlugin {
HeaderFileType("template") -> cStyleComment)))
}

override def projectSettings: Seq[Def.Setting[_]] = Def.settings(headerMappingSettings, additional)
override def projectSettings: Seq[Def.Setting[?]] = Def.settings(headerMappingSettings, additional)

def additional: Seq[Def.Setting[_]] =
def additional: Seq[Def.Setting[?]] =
Def.settings(Compile / compile := {
(Compile / headerCreate).value
(Compile / compile).value
Expand Down