私の Scala 3 プロジェクトでは、Pure Config を使用したいと考えています。しかし、次の例外が発生します。
[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]].
ドキュメントから簡単な例を取り上げました。
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)
}
私build.sbt
はこのように見えます:
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"),
..
)
何か見逃していますか、それとも現時点では不可能ですか?