-
Notifications
You must be signed in to change notification settings - Fork 1.1k
False positive unused import of inline given needed by derives
#23201
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
Comments
The imported symbol is This is just to show the inlined
|
derives
derives
Getting a similar issue with //> using scala 3.nightly
//> using dep io.github.iltotore::iron-circe:3.0.1
//> using options -Werror -Wunused:all
import io.circe.*
import io.github.iltotore.iron.*
import io.github.iltotore.iron.circe.given
import io.github.iltotore.iron.constraint.collection.*
case class IronTypeEncoder(username: String :| MinLength[5]) derives Encoder.AsObject Managed to pinpoint it to this PR 3.7.1-RC1-bin-20250320-a5e029a-NIGHTLY compiles ✅ It's probably what @som-snytt meant by
|
It's the reverse of my previous comment: the expansion of |
I've checked other opened issues and it doesn't seem there's one like this (if that's the case, sorry and please close this).
Also I'm not sure since when the issue appears because we have excluded the unused import warnings in our projects. The minimizer, though, I tried with 3.7.1-RC1 and 3.nightly.
Compiler version
3.nightly
Minimized code
Output
Expectation
No warn is emitted as this import is needed by Jsoniter derives.
The import, when removed as suggested by the compiler, makes the compilation fail:
The text was updated successfully, but these errors were encountered: