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.

0.8.0 regression - automatic derivation compilation error

See original GitHub issue

This compiled fine in 0.7.2:

import scala.concurrent.duration.FiniteDuration

case class A(a: Int,
             b: Double,
             c: FiniteDuration,
             d: Int,
             e: Int,
             f: Int,
             g: FiniteDuration,
             h: FiniteDuration,
             i: Map[String, Int],
             j: B,
             k: E,
             l: F,
             m: L,
             n: O,
             o: R,
             p: P)

case class B(a: D, b: C)

case class C(a: Int)

case class D(a: Int)

case class E(a: String, b: Int)

case class F(a: String, b: G, c: H, d: I)

case class G(a: Int)

case class H(a: Int, b: Map[String, String])

case class I(a: Int,
             b: J,
             c: K,
             d: Map[String, String])

case class J(a: Int)

case class K(a: String,
             b: FiniteDuration)

case class L(a: String,
             b: String,
             c: String,
             d: String,
             e: Map[String, String],
             f: Option[M])

case class M(a: Boolean, b: String, c: N)

case class N(a: String, b: String, c: String)

case class O(a: String, b: Int, c: Int, d: FiniteDuration)

case class P(a: Q, b: O)

case class Q(a: String)

case class R(a: L)

Now with 0.8.0 it fails intermitently, first compilation fails, subsequent compilations succeed:

[error]      could not find implicit value for parameter reader: pureconfig.ConfigReader[A]
[error]      L28:    pureconfig.loadConfig[A](configObject)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:22 (7 by maintainers)

github_iconTop GitHub Comments

6reactions
ruippeixotogcommented, Mar 12, 2018

Ok, thanks for the effort in reproducing this! The Scala compiler seems to be lacking the resources to do a derivation that complex. Try running the last command as SBT_OPTS="-Xms512m -Xmx1536m -Xss2m" /sbt/bin/sbt compile and see that it now compiles successfully.

I was not being able to reproduce it locally because I use the sbt-extras script for launching SBT, which provides way more reasonable defaults. I totally recommend it.

1reaction
aserrallerioscommented, Mar 12, 2018

You’re my hero!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mean Square Error & R2 Score Clearly Explained
Variance, R2 score, and mean square error are central machine learning concepts. Master them here using this complete scikit-learn code.
Read more >
Complete Introduction to Linear Regression in R
Learn how to implement linear regression in R, its purpose, when to use and how to interpret the results of linear regression, such...
Read more >
Multicollinearity in Regression Analysis: Problems, Detection ...
Multicollinearity is when independent variables in a regression model are correlated. I explore its problems, testing your model for it, and solutions.
Read more >
Linear Regression Essentials in R - Articles - STHDA
Root Mean Squared Error, which measures the model prediction error. It corresponds to the average difference between the observed known values ...
Read more >
Standard Error of the Estimate used in Regression Analysis ...
An example of how to calculate the standard error of the estimate (Mean Square Error ) used in simple linear regression analysis.
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