Skip to content

Commit 837b5d9

Browse files
AlexITCclaude
andauthored
Upgrade Scala to 3.8.3 and Play to 3.0.11 (#441)
Scala 3.7+ requires implicit arguments at call sites to be passed with a `using` clause; fix three occurrences that were previously warnings (now errors under -Werror) in BackgroundJobDAO, RepositorySpec, and Main. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent fa8be8a commit 837b5d9

9 files changed

Lines changed: 1077 additions & 1149 deletions

File tree

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import java.nio.file.Files
22
import java.nio.file.StandardCopyOption.REPLACE_EXISTING
33

4-
ThisBuild / scalaVersion := "3.6.4"
4+
ThisBuild / scalaVersion := "3.8.3"
55
ThisBuild / organization := "net.wiringbits"
66

77
val pekkoVersion = "1.6.0"

lib/api/js/yarn.lock

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3112,11 +3112,6 @@ type-is@~1.6.18:
31123112
media-typer "0.3.0"
31133113
mime-types "~2.1.24"
31143114

3115-
typescript@4.3:
3116-
version "4.3.5"
3117-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4"
3118-
integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==
3119-
31203115
union-value@^1.0.0:
31213116
version "1.0.1"
31223117
resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847"

lib/common/js/yarn.lock

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3112,11 +3112,6 @@ type-is@~1.6.18:
31123112
media-typer "0.3.0"
31133113
mime-types "~2.1.24"
31143114

3115-
typescript@4.3:
3116-
version "4.3.5"
3117-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4"
3118-
integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==
3119-
31203115
union-value@^1.0.0:
31213116
version "1.0.1"
31223117
resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847"

lib/ui/yarn.lock

Lines changed: 545 additions & 557 deletions
Large diffs are not rendered by default.

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ evictionErrorLevel := sbt.util.Level.Warn
33

44
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")
55

6-
addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.10")
6+
addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.11")
77

88
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.21.0")
99

server/src/main/scala/net/wiringbits/repositories/daos/BackgroundJobDAO.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ object BackgroundJobDAO {
4747
ORDER BY execute_at, background_job_id
4848
""".withFetchSize(Some(fetchSize)) // without this, all data is loaded into memory
4949

50-
PekkoStream.source(query, backgroundJobParser)(conn)
50+
PekkoStream.source(query, backgroundJobParser)(using conn)
5151
}
5252

5353
def setStatusToFailed(backgroundJobId: UUID, executeAt: Instant, failReason: String)(implicit

server/src/test/scala/net/wiringbits/core/RepositorySpec.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ trait RepositorySpec extends AnyWordSpec with PostgresSpec {
1515
implicit val executionContext: ExecutionContext = Executors.globalEC
1616

1717
def withRepositories[T](clock: Clock = Clock.systemUTC)(runTest: RepositoryComponents => T): T = withDatabase { db =>
18-
val users = new UsersRepository(db, UserTokensConfig(1.hour, 1.hour, "secret"))(Executors.databaseEC, clock)
19-
val userTokens = new UserTokensRepository(db)(Executors.databaseEC)
20-
val userLogs = new UserLogsRepository(db)(Executors.databaseEC)
21-
val backgroundJobs = new BackgroundJobsRepository(db)(Executors.databaseEC, clock)
18+
val users = new UsersRepository(db, UserTokensConfig(1.hour, 1.hour, "secret"))(using Executors.databaseEC, clock)
19+
val userTokens = new UserTokensRepository(db)(using Executors.databaseEC)
20+
val userLogs = new UserLogsRepository(db)(using Executors.databaseEC)
21+
val backgroundJobs = new BackgroundJobsRepository(db)(using Executors.databaseEC, clock)
2222
val components =
2323
RepositoryComponents(
2424
db,

web/src/main/scala/net/wiringbits/Main.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ object Main {
2020

2121
def main(argv: Array[String]): Unit = {
2222
val scheduler = monix.execution.Scheduler.global
23-
val $authState = Var[AuthState](AuthState.Unauthenticated)(scheduler)
24-
val $lang = Var[I18nLang](I18nLang.English)(scheduler)
23+
val $authState = Var[AuthState](AuthState.Unauthenticated)(using scheduler)
24+
val $lang = Var[I18nLang](I18nLang.English)(using scheduler)
2525
val ctx = AppContext(
2626
API(),
2727
$authState,

web/yarn.lock

Lines changed: 523 additions & 573 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)