Skip to content

Commit

Permalink
Merge a3a3f62 into 643379b
Browse files Browse the repository at this point in the history
  • Loading branch information
jcazevedo committed Jun 19, 2021
2 parents 643379b + a3a3f62 commit 327093d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 5 additions & 3 deletions docs/docs/docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,13 @@ ConfigSource.default.load[Conf]

In PureConfig, the derivation of config readers and writers is done by chaining implicits - the converters of larger
structures (like `Conf`) depend on the implicit converters of smaller ones (like `Boolean` or `Custom`). However, the
Scala compiler for Scala 2.x is not helpful in case one of those upstream dependencies is missing, limiting itself to
showing the message above.
Scala compiler for Scala 2.x is not helpful by default in case one of those upstream dependencies is missing, limiting
itself to showing the message above.

To more efficiently debug these "implicit not found" errors, we recommend using [splain](https://github.com/tek/splain).
Please refer to the project's documentation for instructions on how to include the compiler plugin.
splain was integrated into the compiler in [Scala 2.13.6](https://github.com/scala/scala/releases/tag/v2.13.6) and can
be enabled with the `-Vimplicits` scalac flag. For Scala 2.13 versions prior to 2.13.6 or Scala 2.12 versions, please
refer to the project's documentation for instructions on how to include the compiler plugin.

When code using PureConfig derived converters is compiled using the compiler plugin recommended above, you will get a
more thorough error message. In this particular case, the message will be quite large because there are some alternative
Expand Down
9 changes: 4 additions & 5 deletions example/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ val lintFlags =
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 13)) =>
// Excluding -byname-implicit is required for Scala 2.13 due to https://github.com/scala/bug/issues/12072
"-Xlint:_,-byname-implicit"
Seq("-Xlint:_,-byname-implicit", "-Vimplicits")
case _ =>
"-Xlint:_"
Seq("-Xlint:_")
}
}

Expand All @@ -34,8 +34,7 @@ scalacOptions ++= Seq(
"-unchecked",
"-Xfatal-warnings",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard",
lintFlags.value
)
"-Ywarn-value-discard"
) ++ lintFlags.value

scalafmtOnCompile := true

0 comments on commit 327093d

Please sign in to comment.