From 666352a1fba9e4fdea23a29caf9e906c76ae040c Mon Sep 17 00:00:00 2001 From: Tiago Mota Date: Thu, 29 Jun 2023 16:17:57 +0100 Subject: [PATCH 1/5] Solve warnings with no return type on implicits --- .../postgres/db/ExtendedPostgresProfile.scala | 2 +- .../persistence/postgres/SharedActorSystemTestSpec.scala | 2 +- .../postgres/journal/PostgresJournalPerfSpec.scala | 9 +++++---- .../persistence/postgres/query/HardDeleteQueryTest.scala | 2 +- .../query/JournalDaoStreamMessagesMemoryTest.scala | 2 +- .../postgres/query/LogicalDeleteQueryTest.scala | 2 +- .../postgres/query/dao/TestProbeReadJournalDao.scala | 2 +- .../postgres/snapshot/PostgresSnapshotStoreSpec.scala | 5 +++-- 8 files changed, 14 insertions(+), 12 deletions(-) diff --git a/core/src/main/scala/akka/persistence/postgres/db/ExtendedPostgresProfile.scala b/core/src/main/scala/akka/persistence/postgres/db/ExtendedPostgresProfile.scala index a5ca0e56..23e84eef 100644 --- a/core/src/main/scala/akka/persistence/postgres/db/ExtendedPostgresProfile.scala +++ b/core/src/main/scala/akka/persistence/postgres/db/ExtendedPostgresProfile.scala @@ -37,7 +37,7 @@ trait ExtendedPostgresProfile with SearchImplicits with SearchAssistants with JsonImplicits { - implicit val strListTypeMapper = new SimpleArrayJdbcType[String]("text").to(_.toList) + implicit val strListTypeMapper: DriverJdbcType[List[String]] = new SimpleArrayJdbcType[String]("text").to(_.toList) } object MyAPI extends MyAPI } diff --git a/core/src/test/scala/akka/persistence/postgres/SharedActorSystemTestSpec.scala b/core/src/test/scala/akka/persistence/postgres/SharedActorSystemTestSpec.scala index ca61b19a..b4de7585 100644 --- a/core/src/test/scala/akka/persistence/postgres/SharedActorSystemTestSpec.scala +++ b/core/src/test/scala/akka/persistence/postgres/SharedActorSystemTestSpec.scala @@ -30,7 +30,7 @@ abstract class SharedActorSystemTestSpec(val config: Config) extends SimpleSpec implicit lazy val ec: ExecutionContext = system.dispatcher implicit val pc: PatienceConfig = PatienceConfig(timeout = 1.minute) - implicit val timeout = Timeout(1.minute) + implicit val timeout: Timeout = Timeout(1.minute) lazy val serialization = SerializationExtension(system) diff --git a/core/src/test/scala/akka/persistence/postgres/journal/PostgresJournalPerfSpec.scala b/core/src/test/scala/akka/persistence/postgres/journal/PostgresJournalPerfSpec.scala index 44fd8383..4a053391 100644 --- a/core/src/test/scala/akka/persistence/postgres/journal/PostgresJournalPerfSpec.scala +++ b/core/src/test/scala/akka/persistence/postgres/journal/PostgresJournalPerfSpec.scala @@ -8,16 +8,17 @@ package akka.persistence.postgres.journal import akka.actor.Props import akka.persistence.CapabilityFlag import akka.persistence.journal.JournalPerfSpec -import akka.persistence.journal.JournalPerfSpec.{ BenchActor, Cmd, ResetCounter } +import akka.persistence.journal.JournalPerfSpec.{BenchActor, Cmd, ResetCounter} import akka.persistence.postgres.config._ import akka.persistence.postgres.db.SlickExtension import akka.persistence.postgres.util.Schema._ -import akka.persistence.postgres.util.{ ClasspathResources, DropCreate } +import akka.persistence.postgres.util.{ClasspathResources, DropCreate} import akka.testkit.TestProbe import com.typesafe.config.ConfigFactory import org.scalatest.concurrent.ScalaFutures -import org.scalatest.{ BeforeAndAfterAll, BeforeAndAfterEach } +import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach} +import scala.concurrent.ExecutionContextExecutor import scala.concurrent.duration._ abstract class PostgresJournalPerfSpec(config: String, schemaType: SchemaType) @@ -29,7 +30,7 @@ abstract class PostgresJournalPerfSpec(config: String, schemaType: SchemaType) with DropCreate { override protected def supportsRejectingNonSerializableObjects: CapabilityFlag = true - implicit lazy val ec = system.dispatcher + implicit lazy val ec: ExecutionContextExecutor = system.dispatcher implicit def pc: PatienceConfig = PatienceConfig(timeout = 10.minutes) diff --git a/core/src/test/scala/akka/persistence/postgres/query/HardDeleteQueryTest.scala b/core/src/test/scala/akka/persistence/postgres/query/HardDeleteQueryTest.scala index 3033f4f9..8a1e3b3f 100644 --- a/core/src/test/scala/akka/persistence/postgres/query/HardDeleteQueryTest.scala +++ b/core/src/test/scala/akka/persistence/postgres/query/HardDeleteQueryTest.scala @@ -15,7 +15,7 @@ import scala.concurrent.duration._ abstract class HardDeleteQueryTest(val schemaType: SchemaType) extends QueryTestSpec(s"${schemaType.resourceNamePrefix}-application-with-hard-delete.conf") with Matchers { - implicit val askTimeout = 500.millis + implicit val askTimeout: FiniteDuration = 500.millis it should "not return deleted events when using CurrentEventsByTag" in withActorSystem { implicit system => val journalOps = new ScalaPostgresReadJournalOperations(system) diff --git a/core/src/test/scala/akka/persistence/postgres/query/JournalDaoStreamMessagesMemoryTest.scala b/core/src/test/scala/akka/persistence/postgres/query/JournalDaoStreamMessagesMemoryTest.scala index 1048de6a..aa4d1679 100644 --- a/core/src/test/scala/akka/persistence/postgres/query/JournalDaoStreamMessagesMemoryTest.scala +++ b/core/src/test/scala/akka/persistence/postgres/query/JournalDaoStreamMessagesMemoryTest.scala @@ -47,7 +47,7 @@ abstract class JournalDaoStreamMessagesMemoryTest(val schemaType: SchemaType) val journalSequenceActorConfig = readJournalConfig.journalSequenceRetrievalConfiguration val journalTableCfg = journalConfig.journalTableConfiguration - implicit val askTimeout = 50.millis + implicit val askTimeout: FiniteDuration = 50.millis def generateId: Int = 0 diff --git a/core/src/test/scala/akka/persistence/postgres/query/LogicalDeleteQueryTest.scala b/core/src/test/scala/akka/persistence/postgres/query/LogicalDeleteQueryTest.scala index 6c9c0856..c6be56c3 100644 --- a/core/src/test/scala/akka/persistence/postgres/query/LogicalDeleteQueryTest.scala +++ b/core/src/test/scala/akka/persistence/postgres/query/LogicalDeleteQueryTest.scala @@ -12,7 +12,7 @@ import akka.persistence.query.{ EventEnvelope, NoOffset, Sequence } import scala.concurrent.duration._ abstract class LogicalDeleteQueryTest(val schemaType: SchemaType) extends QueryTestSpec(schemaType.configName) { - implicit val askTimeout = 500.millis + implicit val askTimeout: FiniteDuration = 500.millis it should "return logically deleted events when using CurrentEventsByTag (backward compatibility)" in withActorSystem { implicit system => diff --git a/core/src/test/scala/akka/persistence/postgres/query/dao/TestProbeReadJournalDao.scala b/core/src/test/scala/akka/persistence/postgres/query/dao/TestProbeReadJournalDao.scala index c8ed41de..42744f69 100644 --- a/core/src/test/scala/akka/persistence/postgres/query/dao/TestProbeReadJournalDao.scala +++ b/core/src/test/scala/akka/persistence/postgres/query/dao/TestProbeReadJournalDao.scala @@ -27,7 +27,7 @@ object TestProbeReadJournalDao { */ class TestProbeReadJournalDao(val probe: TestProbe) extends ReadJournalDao { // Since the testprobe is instrumented by the test, it should respond very fast - implicit val askTimeout = Timeout(100.millis) + implicit val askTimeout: Timeout = Timeout(100.millis) /** * Returns distinct stream of persistenceIds diff --git a/core/src/test/scala/akka/persistence/postgres/snapshot/PostgresSnapshotStoreSpec.scala b/core/src/test/scala/akka/persistence/postgres/snapshot/PostgresSnapshotStoreSpec.scala index b8d39610..67768859 100644 --- a/core/src/test/scala/akka/persistence/postgres/snapshot/PostgresSnapshotStoreSpec.scala +++ b/core/src/test/scala/akka/persistence/postgres/snapshot/PostgresSnapshotStoreSpec.scala @@ -8,12 +8,13 @@ package akka.persistence.postgres.snapshot import akka.persistence.postgres.config._ import akka.persistence.postgres.db.SlickDatabase import akka.persistence.postgres.util.Schema._ -import akka.persistence.postgres.util.{ ClasspathResources, DropCreate } +import akka.persistence.postgres.util.{ClasspathResources, DropCreate} import akka.persistence.snapshot.SnapshotStoreSpec import com.typesafe.config.ConfigFactory import org.scalatest.BeforeAndAfterAll import org.scalatest.concurrent.ScalaFutures +import scala.concurrent.ExecutionContextExecutor import scala.concurrent.duration._ abstract class PostgresSnapshotStoreSpec(schemaType: SchemaType) @@ -24,7 +25,7 @@ abstract class PostgresSnapshotStoreSpec(schemaType: SchemaType) with DropCreate { implicit val pc: PatienceConfig = PatienceConfig(timeout = 10.seconds) - implicit lazy val ec = system.dispatcher + implicit lazy val ec: ExecutionContextExecutor = system.dispatcher lazy val cfg = system.settings.config.getConfig("postgres-journal") From d81c65bfe2cbdfa7513fdbd07681b29239650b6c Mon Sep 17 00:00:00 2001 From: Tiago Mota Date: Thu, 29 Jun 2023 16:26:54 +0100 Subject: [PATCH 2/5] Update postgresql to 42.6.0 --- project/Dependencies.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index a55b1272..af040f27 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -14,7 +14,7 @@ object Dependencies { val LogbackVersion = "1.4.8" - val JdbcDrivers = Seq("org.postgresql" % "postgresql" % "42.5.4") + val JdbcDrivers = Seq("org.postgresql" % "postgresql" % "42.6.0") val Libraries: Seq[ModuleID] = Seq( "ch.qos.logback" % "logback-classic" % LogbackVersion % Test, From 608c16a3ab5e08f3004dc6377bc5b3dc8b967f43 Mon Sep 17 00:00:00 2001 From: Tiago Mota Date: Thu, 29 Jun 2023 16:27:09 +0100 Subject: [PATCH 3/5] Update sbt to 1.9.1 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index df53bc48..47757fb3 100644 --- a/project/build.properties +++ b/project/build.properties @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -sbt.version=1.7.3 +sbt.version=1.9.1 From 0819913bec7d5575c64e44232a52cd1ee25f1f62 Mon Sep 17 00:00:00 2001 From: Tiago Mota Date: Thu, 29 Jun 2023 16:32:43 +0100 Subject: [PATCH 4/5] Update from olafurpg/setup-scala to coursier/setup-action --- .github/workflows/release.yml | 2 +- .github/workflows/scala.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f1a9115b..d6ca57fc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup Scala and Java - uses: olafurpg/setup-scala@v13 + uses: coursier/setup-action@v1 with: java-version: openjdk@1.11 - uses: olafurpg/setup-gpg@v3 diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml index aea19c52..3eb6c597 100644 --- a/.github/workflows/scala.yml +++ b/.github/workflows/scala.yml @@ -15,8 +15,8 @@ jobs: java: ['openjdk@1.11', 'adopt@1.11', 'openjdk@1.17'] steps: - uses: actions/checkout@v2 - - name: Set up java - uses: olafurpg/setup-scala@v13 + - name: Setup Scala and Java + uses: coursier/setup-action@v1 with: java-version: ${{matrix.java}} - name: Start Postgres From a407f0cd1b367c94f121b05b7f5d2ec88b2ff58c Mon Sep 17 00:00:00 2001 From: Tiago Mota Date: Thu, 29 Jun 2023 16:52:47 +0100 Subject: [PATCH 5/5] Update docs gems --- docs/Gemfile.lock | 72 +++++++++++++++++++++++------------------------ 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 23338ca3..e4694bc6 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -7,37 +7,37 @@ GEM minitest (~> 5.1) tzinfo (~> 1.1) zeitwerk (~> 2.2, >= 2.2.2) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.4) + public_suffix (>= 2.0.2, < 6.0) coffee-script (2.4.1) coffee-script-source execjs coffee-script-source (1.11.1) colorator (1.1.0) commonmarker (0.23.9) - concurrent-ruby (1.2.0) - dnsruby (1.61.9) - simpleidn (~> 0.1) + concurrent-ruby (1.2.2) + dnsruby (1.70.0) + simpleidn (~> 0.2.1) em-websocket (0.5.3) eventmachine (>= 0.12.9) http_parser.rb (~> 0) - ethon (0.15.0) + ethon (0.16.0) ffi (>= 1.15.0) eventmachine (1.2.7) execjs (2.8.1) - faraday (2.3.0) - faraday-net_http (~> 2.0) + faraday (2.7.8) + faraday-net_http (>= 2.0, < 3.1) ruby2_keywords (>= 0.0.4) - faraday-net_http (2.0.3) + faraday-net_http (3.0.2) ffi (1.15.5) forwardable-extended (2.6.0) gemoji (3.0.1) - github-pages (226) + github-pages (228) github-pages-health-check (= 1.17.9) - jekyll (= 3.9.2) + jekyll (= 3.9.3) jekyll-avatar (= 0.7.0) jekyll-coffeescript (= 1.1.1) - jekyll-commonmark-ghpages (= 0.2.0) + jekyll-commonmark-ghpages (= 0.4.0) jekyll-default-layout (= 0.1.4) jekyll-feed (= 0.15.1) jekyll-gist (= 1.5.0) @@ -71,10 +71,10 @@ GEM jemoji (= 0.12.0) kramdown (= 2.3.2) kramdown-parser-gfm (= 1.1.0) - liquid (= 4.0.3) + liquid (= 4.0.4) mercenary (~> 0.3) minima (= 2.5.1) - nokogiri (>= 1.13.4, < 2.0) + nokogiri (>= 1.13.6, < 2.0) rouge (= 3.26.0) terminal-table (~> 1.4) github-pages-health-check (1.17.9) @@ -83,17 +83,17 @@ GEM octokit (~> 4.0) public_suffix (>= 3.0, < 5.0) typhoeus (~> 1.3) - html-pipeline (2.14.2) + html-pipeline (2.14.3) activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.8.0) - i18n (0.9.5) + i18n (1.14.1) concurrent-ruby (~> 1.0) - jekyll (3.9.2) + jekyll (3.9.3) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) - i18n (~> 0.7) + i18n (>= 0.7, < 2) jekyll-sass-converter (~> 1.0) jekyll-watch (~> 2.0) kramdown (>= 1.17, < 3) @@ -109,11 +109,11 @@ GEM coffee-script-source (~> 1.11.1) jekyll-commonmark (1.4.0) commonmarker (~> 0.22) - jekyll-commonmark-ghpages (0.2.0) - commonmarker (~> 0.23.4) + jekyll-commonmark-ghpages (0.4.0) + commonmarker (~> 0.23.7) jekyll (~> 3.9.0) jekyll-commonmark (~> 1.4.0) - rouge (>= 2.0, < 4.0) + rouge (>= 2.0, < 5.0) jekyll-default-layout (0.1.4) jekyll (~> 3.0) jekyll-feed (0.15.1) @@ -197,37 +197,37 @@ GEM gemoji (~> 3.0) html-pipeline (~> 2.2) jekyll (>= 3.0, < 5.0) - just-the-docs (0.3.3) + just-the-docs (0.5.3) jekyll (>= 3.8.5) - jekyll-seo-tag (~> 2.0) - rake (>= 12.3.1, < 13.1.0) + jekyll-seo-tag (>= 2.0) + rake (>= 12.3.1) kramdown (2.3.2) rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) - liquid (4.0.3) - listen (3.7.1) + liquid (4.0.4) + listen (3.8.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.3.6) - mini_portile2 (2.8.1) + mini_portile2 (2.8.2) minima (2.5.1) jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) - minitest (5.17.0) - nokogiri (1.14.3) - mini_portile2 (~> 2.8.0) + minitest (5.18.1) + nokogiri (1.15.2) + mini_portile2 (~> 2.8.2) racc (~> 1.4) - octokit (4.25.0) + octokit (4.25.1) faraday (>= 1, < 3) sawyer (~> 0.9) pathutil (0.16.2) forwardable-extended (~> 2.6) public_suffix (4.0.7) - racc (1.6.2) + racc (1.7.1) rake (13.0.6) - rb-fsevent (0.11.1) + rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) rexml (3.2.5) @@ -250,16 +250,16 @@ GEM thread_safe (0.3.6) typhoeus (1.4.0) ethon (>= 0.9.0) - tzinfo (1.2.10) + tzinfo (1.2.11) thread_safe (~> 0.1) - tzinfo-data (1.2022.1) + tzinfo-data (1.2023.3) tzinfo (>= 1.0.0) unf (0.1.4) unf_ext unf_ext (0.0.8.2) unicode-display_width (1.8.0) wdm (0.1.1) - zeitwerk (2.6.6) + zeitwerk (2.6.8) PLATFORMS ruby