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.

case class with many paramters cant be parsed

See original GitHub issue

When I have a large case class it cant be parsed and errors out with:

could not find implicit value for parameter A: pureconfig.ConfigReader[MyCaseClass]

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
jcazevedocommented, Jul 2, 2018

PureConfig is a “compiler-heavy” library and it seems like the resources provided to the Scala compiler via the Scala Gradle plugin are not enough for your use case. I was able to compile your project using Gradle by increasing the thread stack size, adding the following to build.gradle:

tasks.withType(ScalaCompile) {
    configure(scalaCompileOptions.forkOptions) {
        jvmArgs = ["-Xss2m"]
    }
}
0reactions
Mbomprcommented, Oct 10, 2019

@jcazevedo solution https://github.com/pureconfig/pureconfig/issues/391#issuecomment-401968537 has fixed it for me too. Since it took me a while to reach this page, here is the error message I had in my specific case to help people finding this solution, : could not find implicit value for evidence parameter of type pureconfig.ConfigReader[MyCaseClass]

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get around the Scala case class limit of 22 fields?
Case classes with > 22 parameters are now allowed. That said, there still exists a limit on the number of case class fields,...
Read more >
Case Classes | Tour of Scala
When you create a case class with parameters, the parameters are public val s. You can't reassign message1. sender because it is a...
Read more >
9. Objects, Case Classes, and Traits - Learning Scala [Book]
The val Keyword Is Assumed for Case Class Parameters. By default, case classes convert parameters to value fields so it isn't necessary to...
Read more >
passing anonymous case classes as arguments to ...
val parsed = Try(requestBody.extract[classModel]) //request is an implicit an in ... [error] Such types can participate in value classes, but instances.
Read more >
Scala class examples (constructors, case classes, parameters)
This post contains a collection of examples of Scala classes and class properties. I created most of these in the process of writing...
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