-
Notifications
You must be signed in to change notification settings - Fork 66
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
instance not found in 3.4.0 without -source:3.3 #655
Comments
I wonder if this was foreshadowed by #582 |
With kittens 3.3.0 I get some:
Even on Scala 3.3.3 And if I don't given them, it fails to find the semigroups |
But the following works fine lol:
But not:
|
Can you post a full example? That sounds like a bug in the linter because you are using the import. |
Ah I was trying to reproduce unsuccessfully but I forgot the scalacOptions. |
I think it's kinda right because you also import |
But having just So is there a way to make this work without importing by name the given? import cats.derived.auto.monoid.given
import cats.derived.auto.semigroup.given Or: import cats.derived.auto.monoid.given Monoid[?]
import cats.derived.auto.semigroup.given Semigroup[?] ? |
What do you mean by "does not work" though? The only issue I can see is that if I import No given instance of type cats.kernel.Semigroup[Playground.Rebuffers] was found for parameter ev of method apply in object Semigroup.
I found:
cats.derived.auto.monoid.given_Monoid_A[Playground.Rebuffers](
/* missing */
summon[scala.util.NotGiven[cats.kernel.Monoid[Playground.Rebuffers]]]
)
But no implicit values were found that match type scala.util.NotGiven[cats.kernel.Monoid[Playground.Rebuffers]]. |
Hmm, I guess that means the linter is wrong after all because the import is used. |
In Scala 3.4.0 yelds:
Workaround:
Add this everywhere it fails to compile:
See: scala/scala3#19835
The text was updated successfully, but these errors were encountered: