In my Scala 3 project I want to use Pure Config. But I get the following exception:
[error] -- Error: /Users/mpa/dev/Github/experiments/dotty-cross/src/main/scala/pme123/camunda/dmn/tester/TestConfigHandler.scala:20:22
[error] 20 | ConfigReader[String].map(_.getBytes.toVector)
[error] | ^
[error] |Cannot find an implicit instance of pureconfig.ConfigReader[String].
[error] |If you are trying to read or write a case class or sealed trait consider using PureConfig's auto derivation by adding `import pureconfig.generic.auto._`.
[error] |I found:
[error] |
[error] | pureconfig.Derivation.materializeDerivation[A]
[error] |
[error] |But method materializeDerivation in object Derivation does not match type pureconfig.Derivation[pureconfig.ConfigReader[String]].
I just took the simple example from the doc:
import pureconfig._
import pureconfig.generic.auto._
case class BytesConf(bytes: Vector[Byte])
// reads an array of bytes from a string
implicit val byteVectorReader: ConfigReader[Vector[Byte]] =
ConfigReader[String].map(_.getBytes.toVector)
}
My build.sbt looks like this:
lazy val root = project
.in(file("."))
.settings(
..,
scalaVersion := dottyVersion,
libraryDependencies ++= Seq(
...
"com.github.pureconfig" %% "pureconfig" % "0.14.0"
).map(_.withDottyCompat("2.13.3")) :+
("com.novocode" % "junit-interface" % "0.11"),
..
)
Do I miss something or is this not possible at the moment?