The latest updates of pureconfig in the 0.10.*
series disabled automatic configuration by default.
import pureconfig.generic.auto._
needs to be manually imported. But I have a class hierarchy, where I do not want to import it every time for a child class.
import pureconfig.ConfigReader
abstract class SparkBaseRunner[T <: Product](implicit A: ConfigReader[T])extends App {}
already expects a configReader. When using this base class:
object MyOperation extends SparkBaseRunner[MyCaseClass] {}
it fails with:
could not find implicit value for parameter A: pureconfig.ConfigReader[foo.bar.my.Type]
unless the above mentioned input is specified manually at each child class. Is there a way to avoid this code duplication? Trying to specify the input in the abstract base class did not work for me as it requires already a ConfigReader object.
edit
Trying to manually get access to the config reader inside the base class also fails:
implicit val configReader = deriveReader[T]
could not find implicit value for parameter A: pureconfig.ConfigReader[T]
could not find Lazy implicit value of type pureconfig.generic.DerivedConfigReader[T]
My Scala version is: 2.11.12