question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

loadConfig fails to find implicit reader

See original GitHub issue

This 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:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

10reactions
jcazevedocommented, Dec 4, 2018

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.

3reactions
sfosdalcommented, Aug 3, 2019

Yes that is correct. It is a pain point for my team but we will just use semi-auto instead.

We will be doing the same.

pureconfig.generic.auto._ contains only macros, which yeah, IntelliJ messes up.

am glad semiauto is an option

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found