diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 234e7aa..3aa828f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: - uses: actions/checkout@v6 - uses: coursier/setup-action@v3 with: - jvm: temurin:8 + jvm: temurin:21 apps: sbt - uses: coursier/cache-action@v8 - name: Run tests diff --git a/build.sbt b/build.sbt index fc99c6a..4ef16f0 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,5 @@ ThisBuild / organization := "io.latis-data" -ThisBuild / scalaVersion := "3.3.9" +ThisBuild / scalaVersion := "3.9.0" val fs2DataVersion = "1.8.1" val http4sVersion = "0.23.38" diff --git a/src/main/scala/latis/service/hapi/DataService.scala b/src/main/scala/latis/service/hapi/DataService.scala index c62ed22..e5c52b0 100644 --- a/src/main/scala/latis/service/hapi/DataService.scala +++ b/src/main/scala/latis/service/hapi/DataService.scala @@ -14,13 +14,13 @@ import org.log4s.* /** Implements the `/data` endpoint. */ class DataService[F[_]: Concurrent]( - alg: DataAlgebra[F] with InfoAlgebra[F] + alg: DataAlgebra[F] & InfoAlgebra[F] ) extends Http4sDsl[F] { import Format.* import Include.* import QueryDecoders.* - private[this] val logger = getLogger + private val logger = getLogger private def req2Resp(req: DataRequest, _params:Option[NonEmptyList[String]]): EitherT[F, Status, Response[F]] = { val dataset = req.dataset diff --git a/src/main/scala/latis/service/hapi/InfoService.scala b/src/main/scala/latis/service/hapi/InfoService.scala index 82ecb9c..28e991a 100644 --- a/src/main/scala/latis/service/hapi/InfoService.scala +++ b/src/main/scala/latis/service/hapi/InfoService.scala @@ -13,7 +13,7 @@ import org.log4s.* class InfoService[F[_]: Concurrent](alg: InfoAlgebra[F]) extends Http4sDsl[F] { import QueryDecoders.* - private[this] val logger = getLogger + private val logger = getLogger val service: HttpRoutes[F] = HttpRoutes.of[F] { diff --git a/src/main/scala/latis/service/hapi/Latis3Interpreter.scala b/src/main/scala/latis/service/hapi/Latis3Interpreter.scala index c0efbb5..77e9e6f 100644 --- a/src/main/scala/latis/service/hapi/Latis3Interpreter.scala +++ b/src/main/scala/latis/service/hapi/Latis3Interpreter.scala @@ -108,7 +108,7 @@ class Latis3Interpreter(catalog: Catalog) extends HapiInterpreter[IO] { override def streamJson(data: T, header: JsonObject): Stream[IO, Byte] = { val dataJson = new JsonEncoder().encode(data) val headerList = header.add("format", Json.fromString("json")).toList - val map = ListMap(headerList: _*) + val map = ListMap(headerList*) dataJson .through(json.ast.tokenize) .through(json.wrap.asArrayInObject(at = "data", in = map))