From 076ca1bba96dbdcfffe5519d8778e7cba7622db0 Mon Sep 17 00:00:00 2001 From: Vladimir Logachev Date: Sun, 14 Jul 2024 01:24:13 +0400 Subject: [PATCH] Update to Scala 3 --- .scalafmt.conf | 2 +- build.sbt | 4 ++-- src/test/scala/TransitiveClosureSpec.scala | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index 57bfa03..52b207c 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,5 +1,5 @@ version = "3.8.2" -runner.dialect = scala213 +runner.dialect = scala3 preset=default align.preset = more diff --git a/build.sbt b/build.sbt index 6915864..eabc4ea 100644 --- a/build.sbt +++ b/build.sbt @@ -1,11 +1,11 @@ -val scala2Version = "2.13.14" +val scala3Version = "3.4.2" lazy val root = project .in(file(".")) .settings( name := "transitive-closure", version := "0.1.0-SNAPSHOT", - scalaVersion := scala2Version, + scalaVersion := scala3Version, run / fork := true, // Makes exit codes work as expected libraryDependencies ++= Seq( "org.typelevel" %% "cats-core" % "2.12.0", diff --git a/src/test/scala/TransitiveClosureSpec.scala b/src/test/scala/TransitiveClosureSpec.scala index 9743397..36b33d4 100644 --- a/src/test/scala/TransitiveClosureSpec.scala +++ b/src/test/scala/TransitiveClosureSpec.scala @@ -12,7 +12,11 @@ object TransitiveClosureTestingTools { def combineAssertions(assertions: Seq[Assertion]): Assertion = { val cp = new Checkpoint - assertions.foreach(x => cp(x: Unit)) + assertions.foreach(x => + cp { + val _ = x; + } + ) cp.reportAll() Succeeded }