Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scalafmt-core to 3.8.4 #711

Closed
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
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# reformat with scalafmt 3.8.2
6e52790fdcaa57dd38a88c547739c8b95d8fb04e

# Scala Steward: Reformat with scalafmt 3.8.4
bf1dd91ba61a569a4d91843418fa13ff11771a09
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.8.3
version = 3.8.4

project.git = true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,20 +153,20 @@ private[journal] object Batch_4_1_0 {
}

final case class Appends(
offset: Offset,
records: NonEmptyList[ActionRecord[Action.Append]],
offset: Offset,
records: NonEmptyList[ActionRecord[Action.Append]],
) extends Batch_4_1_0

final case class Delete(
offset: Offset,
to: DeleteTo,
origin: Option[Origin],
version: Option[Version],
offset: Offset,
to: DeleteTo,
origin: Option[Origin],
version: Option[Version],
) extends Batch_4_1_0

final case class Purge(
offset: Offset,
origin: Option[Origin],
version: Option[Version],
offset: Offset,
origin: Option[Origin],
version: Option[Version],
) extends Batch_4_1_0
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,20 @@ private[journal] object Batch_4_1_0_Alternative_with_Vector {
}

final case class Appends(
offset: Offset,
records: NonEmptyList[ActionRecord[Action.Append]],
offset: Offset,
records: NonEmptyList[ActionRecord[Action.Append]],
) extends Batch_4_1_0_Alternative_with_Vector

final case class Delete(
offset: Offset,
to: DeleteTo,
origin: Option[Origin],
version: Option[Version],
offset: Offset,
to: DeleteTo,
origin: Option[Origin],
version: Option[Version],
) extends Batch_4_1_0_Alternative_with_Vector

final case class Purge(
offset: Offset,
origin: Option[Origin],
version: Option[Version],
offset: Offset,
origin: Option[Origin],
version: Option[Version],
) extends Batch_4_1_0_Alternative_with_Vector
}
Original file line number Diff line number Diff line change
Expand Up @@ -153,20 +153,20 @@ private[journal] object Batch_4_1_2 {
}

final case class Appends(
offset: Offset,
records: NonEmptyList[ActionRecord[Action.Append]],
offset: Offset,
records: NonEmptyList[ActionRecord[Action.Append]],
) extends Batch_4_1_2

final case class Delete(
offset: Offset,
to: DeleteTo,
origin: Option[Origin],
version: Option[Version],
offset: Offset,
to: DeleteTo,
origin: Option[Origin],
version: Option[Version],
) extends Batch_4_1_2

final case class Purge(
offset: Offset,
origin: Option[Origin], // used only for logging
version: Option[Version], // used only for logging
offset: Offset,
origin: Option[Origin], // used only for logging
version: Option[Version], // used only for logging
) extends Batch_4_1_2
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ private[journal] object Batch_Alternative_with_Aggressive_Reshuffling {
}

private final case class State(
private val purge: Option[Purge] = None,
private val appends: Option[Appends] = None,
private val delete: Option[Delete] = None,
private val purge: Option[Purge] = None,
private val appends: Option[Appends] = None,
private val delete: Option[Delete] = None,
) {
// Expects records to be provided in reversed order, e.g., youngest first
private def handle: ActionRecord[Action] => State = {
Expand Down Expand Up @@ -117,20 +117,20 @@ private[journal] object Batch_Alternative_with_Aggressive_Reshuffling {
}

final case class Appends(
offset: Offset,
records: NonEmptyList[ActionRecord[Action.Append]],
offset: Offset,
records: NonEmptyList[ActionRecord[Action.Append]],
) extends Batch_Alternative_with_Aggressive_Reshuffling

final case class Delete(
offset: Offset,
to: DeleteTo,
origin: Option[Origin],
version: Option[Version],
offset: Offset,
to: DeleteTo,
origin: Option[Origin],
version: Option[Version],
) extends Batch_Alternative_with_Aggressive_Reshuffling

final case class Purge(
offset: Offset,
origin: Option[Origin],
version: Option[Version],
offset: Offset,
origin: Option[Origin],
version: Option[Version],
) extends Batch_Alternative_with_Aggressive_Reshuffling
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import pureconfig.ConfigReader
import pureconfig.generic.semiauto.deriveReader

private[journal] final case class CassandraConsistencyConfig(
read: CassandraConsistencyConfig.Read = CassandraConsistencyConfig.Read.default,
write: CassandraConsistencyConfig.Write = CassandraConsistencyConfig.Write.default,
read: CassandraConsistencyConfig.Read = CassandraConsistencyConfig.Read.default,
write: CassandraConsistencyConfig.Write = CassandraConsistencyConfig.Write.default,
)

private[journal] object CassandraConsistencyConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ private[journal] object CassandraSync {
def apply[F[_]](implicit F: CassandraSync[F]): CassandraSync[F] = F

def apply[F[_]: Temporal: CassandraSession](
keyspace: KeyspaceConfig,
table: String,
origin: Option[Origin],
keyspace: KeyspaceConfig,
table: String,
origin: Option[Origin],
): CassandraSync[F] = {

val autoCreate = if (keyspace.autoCreate) AutoCreate.Table else AutoCreate.None
apply(keyspace = keyspace.name, table = table, autoCreate = autoCreate, metadata = origin.map(_.value))
}

def apply[F[_]: Temporal: CassandraSession](
keyspace: String,
table: String,
autoCreate: AutoCreate,
metadata: Option[String],
keyspace: String,
table: String,
autoCreate: AutoCreate,
metadata: Option[String],
): CassandraSync[F] = {

new CassandraSync[F] {
Expand Down Expand Up @@ -71,9 +71,9 @@ private[journal] object CassandraSync {
* @see [[com.evolutiongaming.cassandra.sync.CassandraSync]] for more details.
*/
def of[F[_]: Temporal: CassandraSession](
keyspace: KeyspaceConfig,
table: String,
origin: Option[Origin],
keyspace: KeyspaceConfig,
table: String,
origin: Option[Origin],
): F[CassandraSync[F]] = {

for {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private[journal] object CreateTables { self =>
def apply[F[_]](implicit F: CreateTables[F]): CreateTables[F] = F

def apply[F[_]: Monad: CassandraCluster: CassandraSession: CassandraSync](
log: Log[F],
log: Log[F],
): CreateTables[F] = new CreateTables[F] {

def apply(keyspace: String, tables: Nel[Table]) = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import pureconfig.ConfigReader
import pureconfig.generic.semiauto.deriveReader

private[journal] final case class KeyspaceConfig(
name: String = "journal",
replicationStrategy: ReplicationStrategyConfig = ReplicationStrategyConfig.Default,
autoCreate: Boolean = true,
name: String = "journal",
replicationStrategy: ReplicationStrategyConfig = ReplicationStrategyConfig.Default,
autoCreate: Boolean = true,
)

private[journal] object KeyspaceConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ private[journal] object MigrateSchema {
* The instance of schema migrator.
*/
def forSettingKey[F[_]: MonadThrow](
cassandraSync: CassandraSync[F],
settings: Settings[F],
settingKey: String,
migrations: Nel[String],
cassandraSync: CassandraSync[F],
settings: Settings[F],
settingKey: String,
migrations: Nel[String],
): MigrateSchema[F] = new MigrateSchema[F] {

def setVersion(version: Int): F[Unit] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ private[journal] object SettingStatements {
object Select {

def of[F[_]: Monad: CassandraSession](
name: TableName,
consistencyConfig: CassandraConsistencyConfig.Read,
name: TableName,
consistencyConfig: CassandraConsistencyConfig.Read,
): F[Select[F]] = {

val query = s"SELECT value, timestamp, origin FROM ${name.toCql} WHERE key = ?"
Expand Down Expand Up @@ -111,8 +111,8 @@ private[journal] object SettingStatements {
object Insert {

def of[F[_]: Monad: CassandraSession](
name: TableName,
consistencyConfig: CassandraConsistencyConfig.Write,
name: TableName,
consistencyConfig: CassandraConsistencyConfig.Write,
): F[Insert[F]] = {

val query = s"INSERT INTO ${name.toCql} (key, value, timestamp, origin) VALUES (?, ?, ?, ?)"
Expand All @@ -135,8 +135,8 @@ private[journal] object SettingStatements {
object Delete {

def of[F[_]: Monad: CassandraSession](
name: TableName,
consistencyConfig: CassandraConsistencyConfig.Write,
name: TableName,
consistencyConfig: CassandraConsistencyConfig.Write,
): F[Delete[F]] = {

val query = s"DELETE FROM ${name.toCql} WHERE key = ?"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import com.evolutiongaming.sstream.Stream
private[journal] object SettingsCassandra {

def apply[F[_]: Monad: Clock](
statements: Statements[F],
origin: Option[Origin],
statements: Statements[F],
origin: Option[Origin],
): Settings[F] = new Settings[F] {

def get(key: K): F[Option[Setting]] = {
Expand Down Expand Up @@ -46,9 +46,9 @@ private[journal] object SettingsCassandra {
}

def of[F[_]: Monad: Parallel: Clock: CassandraSession](
table: TableName,
origin: Option[Origin],
consistencyConfig: CassandraConsistencyConfig,
table: TableName,
origin: Option[Origin],
consistencyConfig: CassandraConsistencyConfig,
): F[Settings[F]] = {
for {
statements <- Statements.of[F](table, consistencyConfig)
Expand All @@ -58,16 +58,16 @@ private[journal] object SettingsCassandra {
}

final case class Statements[F[_]](
select: SettingStatements.Select[F],
insert: SettingStatements.Insert[F],
all: SettingStatements.All[F],
delete: SettingStatements.Delete[F],
select: SettingStatements.Select[F],
insert: SettingStatements.Insert[F],
all: SettingStatements.All[F],
delete: SettingStatements.Delete[F],
)

object Statements {
def of[F[_]: Monad: Parallel: CassandraSession](
table: TableName,
consistencyConfig: CassandraConsistencyConfig,
table: TableName,
consistencyConfig: CassandraConsistencyConfig,
): F[Statements[F]] = {

val statements = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ object CassandraCluster {
def apply[F[_]](implicit F: CassandraCluster[F]): CassandraCluster[F] = F

def apply[F[_]: Async: Parallel: FromGFuture](
cluster: scassandra.CassandraCluster[F],
retries: Int,
cluster: scassandra.CassandraCluster[F],
retries: Int,
): CassandraCluster[F] = new CassandraCluster[F] {

def session = {
Expand All @@ -43,9 +43,9 @@ object CassandraCluster {
}

def make[F[_]: Async: Parallel: FromGFuture](
config: CassandraConfig,
cassandraClusterOf: CassandraClusterOf[F],
retries: Int,
config: CassandraConfig,
cassandraClusterOf: CassandraClusterOf[F],
retries: Int,
): Resource[F, CassandraCluster[F]] = {

for {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ object CassandraSession {
def apply[F[_]](implicit F: CassandraSession[F]): CassandraSession[F] = F

def apply[F[_]](
session: CassandraSession[F],
retries: Int,
trace: Boolean = false,
session: CassandraSession[F],
retries: Int,
trace: Boolean = false,
): CassandraSession[F] = {
val retryPolicy = new LoggingRetryPolicy(NextHostRetryPolicy(retries))
session.configured(retryPolicy, trace)
}

private def apply[F[_]: Async: FromGFuture](
session: scassandra.CassandraSession[F],
session: scassandra.CassandraSession[F],
): CassandraSession[F] = {
new CassandraSession[F] {

Expand All @@ -60,7 +60,7 @@ object CassandraSession {
}

def make[F[_]: Async: Parallel: FromGFuture](
session: scassandra.CassandraSession[F],
session: scassandra.CassandraSession[F],
): Resource[F, CassandraSession[F]] = {
apply[F](session)
.enhanceError
Expand All @@ -70,8 +70,8 @@ object CassandraSession {
implicit class CassandraSessionOps[F[_]](val self: CassandraSession[F]) extends AnyVal {

def configured(
retryPolicy: RetryPolicy,
trace: Boolean,
retryPolicy: RetryPolicy,
trace: Boolean,
): CassandraSession[F] = new CassandraSession[F] {

def prepare(query: String) = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ object ResultSet {
}

def apply[F[_]: Spawn, A](
fetch: F[Unit],
fetched: F[Boolean],
next: F[List[A]],
fetch: F[Unit],
fetched: F[Boolean],
next: F[List[A]],
): Stream[F, A] = new Stream[F, A] {

def foldWhileM[L, R](l: L)(f: (L, A) => F[Either[L, R]]) = {
Expand Down
Loading
Loading