Skip to content

Commit

Permalink
Merge pull request #198 from SwissBorg/bump-deps
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
tiagomota authored Sep 30, 2021
2 parents 0260986 + 92c5e4d commit 7739f01
Show file tree
Hide file tree
Showing 15 changed files with 169 additions and 142 deletions.
11 changes: 7 additions & 4 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
version = 2.7.5
version = 3.0.5

style = defaultWithAlign

docstrings = JavaDoc
indentOperator = spray
docstrings.style = Asterisk
docstrings.wrap = no
indentOperator.preset = spray
maxColumn = 120
rewrite.rules = [RedundantParens, SortImports, AvoidInfix]
unindentTopLevelOperators = true
Expand All @@ -12,7 +13,8 @@ align.openParenDefnSite = false
align.openParenCallSite = false
optIn.breakChainOnFirstMethodDot = false
optIn.configStyleArguments = false
danglingParentheses = false
danglingParentheses.defnSite = false
danglingParentheses.callSite = false
spaces.inImportCurlyBraces = true
rewrite.neverInfix.excludeFilters = [
and
Expand Down Expand Up @@ -51,3 +53,4 @@ rewriteTokens = {
"←": "<-"
}
newlines.afterCurlyLambda = preserve
newlines.implicitParamListModifierPrefer = before
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ object DbErrors {
DBIO.successful(())
}

def withHandledIndexErrors(logger: Logger, indexDetails: String)(dbio: DBIOAction[_, NoStream, Effect])(implicit
ec: ExecutionContext): DBIOAction[Unit, NoStream, Effect] =
def withHandledIndexErrors(logger: Logger, indexDetails: String)(dbio: DBIOAction[_, NoStream, Effect])(
implicit ec: ExecutionContext): DBIOAction[Unit, NoStream, Effect] =
dbio.asTry.flatMap {
case Failure(ex: SQLException) if ex.getSQLState == PgUniqueViolation =>
logger.debug(s"Index $indexDetails already exists")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import scala.collection.immutable._
import scala.concurrent.{ ExecutionContext, Future }
import scala.util.Try

class ByteArrayJournalSerializer(serialization: Serialization, tagConverter: TagIdResolver)(implicit
val executionContext: ExecutionContext)
class ByteArrayJournalSerializer(serialization: Serialization, tagConverter: TagIdResolver)(
implicit val executionContext: ExecutionContext)
extends FlowPersistentReprSerializer[JournalRow] {

override def serialize(persistentRepr: PersistentRepr, tags: Set[String]): Future[JournalRow] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import slick.jdbc.JdbcBackend._

import scala.concurrent.ExecutionContext

class FlatJournalDao(val db: Database, val journalConfig: JournalConfig, serialization: Serialization)(implicit
val ec: ExecutionContext,
class FlatJournalDao(val db: Database, val journalConfig: JournalConfig, serialization: Serialization)(
implicit val ec: ExecutionContext,
val mat: Materializer)
extends BaseByteArrayJournalDao {
val queries = new JournalQueries(FlatJournalTable(journalConfig.journalTableConfiguration))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import slick.jdbc.JdbcBackend.Database
import scala.collection.immutable.{ List, Nil, Seq }
import scala.concurrent.{ ExecutionContext, Future }

class NestedPartitionsJournalDao(db: Database, journalConfig: JournalConfig, serialization: Serialization)(implicit
ec: ExecutionContext,
class NestedPartitionsJournalDao(db: Database, journalConfig: JournalConfig, serialization: Serialization)(
implicit ec: ExecutionContext,
mat: Materializer)
extends FlatJournalDao(db, journalConfig, serialization) {
override val queries = new JournalQueries(NestedPartitionsJournalTable(journalConfig.journalTableConfiguration))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import slick.jdbc.JdbcBackend.Database
import scala.collection.immutable.{ Nil, Seq }
import scala.concurrent.{ ExecutionContext, Future }

class PartitionedJournalDao(db: Database, journalConfig: JournalConfig, serialization: Serialization)(implicit
ec: ExecutionContext,
class PartitionedJournalDao(db: Database, journalConfig: JournalConfig, serialization: Serialization)(
implicit ec: ExecutionContext,
mat: Materializer)
extends FlatJournalDao(db, journalConfig, serialization) {
override val queries = new JournalQueries(PartitionedJournalTable(journalConfig.journalTableConfiguration))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import scala.collection.immutable.NumericRange
import scala.concurrent.duration.FiniteDuration

object JournalSequenceActor {
def props(readJournalDao: ReadJournalDao, config: JournalSequenceRetrievalConfig)(implicit
materializer: Materializer): Props = Props(new JournalSequenceActor(readJournalDao, config))
def props(readJournalDao: ReadJournalDao, config: JournalSequenceRetrievalConfig)(
implicit materializer: Materializer): Props = Props(new JournalSequenceActor(readJournalDao, config))

private case object QueryOrderingIds
private case class NewOrderingIds(originalOffset: Long, elements: Seq[OrderingId])
Expand Down Expand Up @@ -56,8 +56,8 @@ object JournalSequenceActor {
* This is required to guarantee the EventByTag does not skip any rows in case rows with a higher (ordering) id are
* visible in the database before rows with a lower (ordering) id.
*/
class JournalSequenceActor(readJournalDao: ReadJournalDao, config: JournalSequenceRetrievalConfig)(implicit
materializer: Materializer)
class JournalSequenceActor(readJournalDao: ReadJournalDao, config: JournalSequenceRetrievalConfig)(
implicit materializer: Materializer)
extends Actor
with ActorLogging
with Timers {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import scala.concurrent.{ ExecutionContext, Future }
import scala.util.{ Failure, Success }

class ByteArraySnapshotDao(db: JdbcBackend#Database, snapshotConfig: SnapshotConfig, serialization: Serialization)(
implicit
ec: ExecutionContext,
implicit ec: ExecutionContext,
val mat: Materializer)
extends SnapshotDao {
import akka.persistence.postgres.db.ExtendedPostgresProfile.api._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ abstract class JournalSequenceActorTest(val schemaType: SchemaType) extends Quer
* (since the actor queries every second by default,
* this is effectively the number of seconds after which events are assumed missing)
*/
def withJournalSequenceActor(db: JdbcBackend.Database, maxTries: Int)(f: ActorRef => Unit)(implicit
system: ActorSystem): Unit = {
def withJournalSequenceActor(db: JdbcBackend.Database, maxTries: Int)(f: ActorRef => Unit)(
implicit system: ActorSystem): Unit = {
import system.dispatcher
implicit val mat: Materializer = SystemMaterializer(system).materializer
val readJournalDao =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ trait ReadJournalOperations {
def countJournal: Future[Long]
}

class ScalaPostgresReadJournalOperations(readJournal: PostgresReadJournal)(implicit
system: ActorSystem,
class ScalaPostgresReadJournalOperations(readJournal: PostgresReadJournal)(
implicit system: ActorSystem,
mat: Materializer)
extends ReadJournalOperations {
def this(system: ActorSystem) =
Expand Down Expand Up @@ -106,8 +106,8 @@ class ScalaPostgresReadJournalOperations(readJournal: PostgresReadJournal)(impli
.map(_.sum)
}

class JavaDslPostgresReadJournalOperations(readJournal: javadsl.PostgresReadJournal)(implicit
system: ActorSystem,
class JavaDslPostgresReadJournalOperations(readJournal: javadsl.PostgresReadJournal)(
implicit system: ActorSystem,
mat: Materializer)
extends ReadJournalOperations {
def this(system: ActorSystem) =
Expand Down Expand Up @@ -300,15 +300,15 @@ abstract class QueryTestSpec(config: String, configOverrides: Map[String, Config
system.actorOf(Props(new TestActor(persistenceId, replyToMessages)))
}

def withTestActors(seq: Int = 1, replyToMessages: Boolean = false)(f: (ActorRef, ActorRef, ActorRef) => Unit)(implicit
system: ActorSystem): Unit = {
def withTestActors(seq: Int = 1, replyToMessages: Boolean = false)(f: (ActorRef, ActorRef, ActorRef) => Unit)(
implicit system: ActorSystem): Unit = {
val refs = (seq until seq + 3).map(setupEmpty(_, replyToMessages)).toList
try f(refs.head, refs.drop(1).head, refs.drop(2).head)
finally killActors(refs: _*)
}

def withManyTestActors(amount: Int, seq: Int = 1, replyToMessages: Boolean = false)(f: Seq[ActorRef] => Unit)(implicit
system: ActorSystem): Unit = {
def withManyTestActors(amount: Int, seq: Int = 1, replyToMessages: Boolean = false)(f: Seq[ActorRef] => Unit)(
implicit system: ActorSystem): Unit = {
val refs = (seq until seq + amount).map(setupEmpty(_, replyToMessages)).toList
try f(refs)
finally killActors(refs: _*)
Expand Down
13 changes: 5 additions & 8 deletions docs/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,26 @@ source "https://rubygems.org"
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 3.8.7"

# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.0"
gem "minima", "~> 2.5.1"

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins
gem "github-pages", group: :jekyll_plugins
gem "just-the-docs"

# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
gem "jekyll-feed", "~> 0.9"
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do
gem "tzinfo", "~> 1.2"
gem "tzinfo", "~> 1.2.7"
gem "tzinfo-data"
end

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.0", :install_if => Gem.win_platform?

gem "github-pages", "~> 206", group: :jekyll_plugins
gem "just-the-docs"
Loading

0 comments on commit 7739f01

Please sign in to comment.