loadConfig fails to find implicit reader
See original GitHub issueThis is on version 0.10.1. When I downgrade to 0.9.1 then it works.
Error:(17, 51) could not find implicit value for parameter reader: pureconfig.Derivation[pureconfig.ConfigReader[tvr.config.AppConfig]]
val mongo = Mongo(loadConfigOrThrow[AppConfig]("tvr").mongoConfig)
Error:(17, 51) not enough arguments for method loadConfigOrThrow: (implicit evidence$2: scala.reflect.ClassTag[tvr.config.AppConfig], implicit reader: pureconfig.Derivation[pureconfig.ConfigReader[tvr.config.AppConfig]])tvr.config.AppConfig.
Unspecified value parameter reader.
val mongo = Mongo(loadConfigOrThrow[AppConfig]("tvr").mongoConfig)
Config is simple:
final case class AppConfig(mongoConfig: MongoConfig)
final case class MongoConfig(credentials: MongoCredentials, hosts: List[String], port: String, replicaSetName: String)
final case class MongoCredentials(user: String, password: String, authDatabaseName: String)
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
could not find implicit value for parameter reader: pureconfig ...
Error is that pureconfig's loadConfig method does not find implicit value for it's reader parameter. One solution is to give implicit reader ......
Read more >melrief/pureconfig - Gitter
Hello guys, I'm getting the following error could not find implicit value for parameter reader: pureconfig.Derivation[pureconfig.ConfigReader[List[MyModel]]] on ...
Read more >Deep dive into PureConfig types in Scala - Knoldus Blogs
Error :(11, 70) could not find implicit value for parameter reader: ... enough arguments for method loadConfig: (implicit reader: pureconfig.
Read more >pureconfig.error.ConfigReaderFailures Scala Example
This page shows Scala examples of pureconfig.error. ... Either[ConfigReaderFailures, Config] = ConfigSource.string(s"value = $value").load[Config] }.
Read more >Cisco IronPort AsyncOS 6.3.7 for Web Release Notes
For more information, see the “Allowing Guest Access to Users Who Fail Authentication” section in the “Identities” chapter of the IronPort AsyncOS for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m not sure if that’s the case, since I don’t know which imports you’re using, but the automatic derivation of readers and writers is disabled by default since 0.10.0. It is now necessary to import
pureconfig.generic.auto._
everywhere a config is loaded or written, or use semi-automatic or manual derivation. You can read more about it in the documentation.We will be doing the same.
pureconfig.generic.auto._
contains only macros, which yeah, IntelliJ messes up.am glad semiauto is an option