Skip to content

Commit

Permalink
fixup! upgrade scala3
Browse files Browse the repository at this point in the history
  • Loading branch information
Karry committed May 28, 2024
1 parent f28fade commit a4755f3
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
19 changes: 17 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import sbt.Keys.scalacOptions

import scala.collection.Seq

def pureconfig = libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) =>
Expand Down Expand Up @@ -628,12 +632,23 @@ lazy val site = project
.settings(BuildSettings.common)
.settings(BuildSettings.microsite)
.settings(
libraryDependencies += "org.scalameta" %% "mdoc" % "2.3.2" excludeAll (
libraryDependencies += "org.scalameta" %% "mdoc" % "2.5.2" excludeAll (
ExclusionRule(organization = "org.slf4j"),
ExclusionRule(organization = "org.scala-lang.modules", name = "scala-collection-compat_2.13")
),
publish / skip := true,
scalacOptions := scalacOptions.value.filterNot(_ == "-Xfatal-warnings").filterNot(_ == "-Xlint:infer-any")
scalacOptions --= Seq(
"-Xfatal-warnings",
"-Xlint:infer-any",
"-Wvalue-discard",
"-Wnonunit-statement",
"-Wunused:implicits",
"-Wunused:explicits",
"-Wunused:imports",
"-Wunused:locals",
"-Wunused:params",
"-Wunused:privates"
)
)

lazy val sslConfig = project
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.avast.sst.pureconfig
import com.typesafe.config.Config
import pureconfig.ConfigReader

/** Used to retrieve both parsed configuration object and underlying [[Config]] instance. */
/** Used to retrieve both parsed configuration object and underlying [[config]] instance. */
final case class WithConfig[T](value: T, config: Config)

object WithConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import pureconfig.error.ConfigReaderException
import pureconfig.{ConfigReader, ConfigSource}
import pureconfig.generic.derivation.default.*

import scala.annotation.nowarn

@nowarn("msg=unused value")
class PureConfigModuleTest extends AnyFunSuite {

private val source = ConfigSource.string("""|number = 123
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package com.avast.sst.pureconfig
import cats.{Applicative, Eq, FlatMap, Functor, Monad, Monoid}
import com.avast.sst.pureconfig.util.Toggle
import com.avast.sst.pureconfig.util.Toggle.{Disabled, Enabled}
import com.avast.sst.pureconfig.util.Toggle.TogglePureConfigInstances.*
import com.typesafe.config.ConfigRenderOptions
import org.scalatest.diagrams.Diagrams
import org.scalatest.funsuite.AnyFunSuite

import scala.annotation.nowarn

@nowarn("msg=unused value")
class ToggleTest extends AnyFunSuite with Diagrams {

test("has Functor instance and map method works correctly") {
Expand Down

0 comments on commit a4755f3

Please sign in to comment.