Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.13.5 reports false positive unused evidence for some implicits #12355

Closed
arixmkii opened this issue Feb 28, 2021 · 2 comments
Closed

2.13.5 reports false positive unused evidence for some implicits #12355

arixmkii opened this issue Feb 28, 2021 · 2 comments

Comments

@arixmkii
Copy link

reproduction steps

Example in scastie - compilation will fail (because fatal warnings are on)
https://scastie.scala-lang.org/xzO1YZ7yR5OSmE1uyMzrrw

using Scala 2.13.5,

import pureconfig.ConfigReader
import pureconfig.generic.semiauto._

final case class SomeConfig[C](optVal: Option[C])

implicit def configReader[C : ConfigReader] = deriveReader[SomeConfig[C]] // this will fail to compile

problem

The code compiled just fine with 2.13.4 and it is impossible to compile this with fatal warnings enabled w/o adding @nowarn annotation, what in turn causes issues for 2.12 series cross-compilation, because it reports warning that the annotation suppresses nothing.

@som-snytt
Copy link

Probably try -Wmacros:after to check only after macros are expanded.

@arixmkii
Copy link
Author

arixmkii commented Mar 1, 2021

It helped for 2.13.5! Was not aware of this option and it seems that the name changed between 2.12 and 2.13 series. Will do the reading.
@som-snytt Thank you a lot! I guess this ticket can be safely closed now. Should I close it myself or would maintainers do the honors?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants