Skip to content

Commit

Permalink
Mise à jour vers Scala 3.3.4 (#2091)
Browse files Browse the repository at this point in the history
  • Loading branch information
niladic authored Oct 2, 2024
1 parent 92a6d28 commit e429253
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
1 change: 0 additions & 1 deletion app/helper/Pseudonymizer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package helper

import cats.syntax.all._
import com.github.tototoshi.csv.CSVReader
import helper.StringHelper
import java.util.UUID
import scala.util.Random

Expand Down
1 change: 0 additions & 1 deletion app/models/Mandat.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package models
import cats.syntax.all._
import java.time.ZonedDateTime
import java.util.UUID
import models.Sms

object Mandat {
case class Id(underlying: UUID)
Expand Down
3 changes: 1 addition & 2 deletions app/models/dataModels.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import helper.{PlayFormHelpers, Time}
import helper.MiscHelpers.toTuple
import java.time.{Instant, ZonedDateTime}
import java.util.UUID
import models.Answer
import models.Application.{MandatType, SeenByUser}
import play.api.libs.functional.syntax._
import play.api.libs.json._
Expand Down Expand Up @@ -207,7 +206,7 @@ object dataModels {
}

object SmsFormats {
import models.Sms

implicit val smsIdReads: Reads[Sms.ApiId] = implicitly[Reads[String]].map(Sms.ApiId.apply)

implicit val smsIdWrites: Writes[Sms.ApiId] =
Expand Down
24 changes: 16 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ lazy val root = (project in file("."))

inThisBuild(
List(
scalaVersion := "3.3.3",
scalaVersion := "3.3.4",
// The following setting are for scalafix
semanticdbEnabled := true, // enable SemanticDB
semanticdbVersion := scalafixSemanticdb.revision // use Scalafix compatible version
Expand All @@ -34,24 +34,32 @@ scalacOptions ++= Seq(
"-feature",
// "-deprecation", // Added by Play
// "-unchecked", // Added by Play
// Note: To show all possible warns use "-W", for Wconf filters, use "-Wconf:help"
// Silence a warning from anorm https://github.com/playframework/anorm/issues/568
"-Wconf:src=src/.*/anorm/macros/RowParserImpl.scala:s",
"-Wconf:src=app/services/.*.scala&msg=would fail on pattern case.*anorm:s",
// Silence warns generated by Play codes generators
// https://github.com/playframework/playframework/issues/6302
// - first one is due to -Wnonunit-statement with routes generator
"-Wconf:src=routes/.*&msg=unused value:s",
// - second one is due to -Wunused:imports with twirl
"-Wconf:src=twirl/.*&msg=unused import:s",
// Silence specs2 warnings from -Wnonunit-statement
"-Wconf:src=aplus/test/.*&msg=unused value:s",
// Sets warnings as errors on the CI
if (insideCI.value) "-Wconf:any:error" else "-Wconf:any:warning",
// Recommended for cats-effect
// https://typelevel.org/cats-effect/docs/getting-started
// "-Wnonunit-statement", // TODO: the route warnings needs to be silenced
// Note: To show all possible warns, use "-W"
// TODO: 3.3.4 should have the src filter
// https://github.com/scala/scala3/pull/21087/files
// https://github.com/playframework/playframework/issues/6302
// "-Wunused:imports", // gives non useful warns due to twirl
"-Wnonunit-statement",
"-Wunused:imports",
"-Wunused:privates",
"-Wunused:locals",
// "-Wunused:explicits", // TODO: lot of warnings, enable later
"-Wunused:implicits",
"-Wvalue-discard",
)

val anormVersion = "2.7.0"
val anormVersion = "2.7.0" // TODO: on update, remove the warnings silencers

lazy val anormDependency = "org.playframework.anorm" %% "anorm" % anormVersion

Expand Down

0 comments on commit e429253

Please sign in to comment.