-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Another given priority scheme to ensure transitivity #21325
Conversation
It applies the following tweaks: - Do treat givens as higher priority than implicits. The previous logic was faulty, but is corrected now. - Drop special handling of NotGiven in prioritization. The previous logic pretended to do so, but was ineffective. - Do use the old priority scheme for implicit/implicit pairs. - Do owner score for givens as a tie breaker if after all other tests we still have an ambiguity.
Alternative to #21305 |
@WojciechMazur Can we test this one as well with the OpenCB? |
I've started the OpenCB for 3.5.0-RC6 + this change so we can compare it directly with the results from alternative PR and don't need to care of other issues present on main. I should have results in ~3h |
There seems to be less arnings in general when compared to previous solution
There is 1 new ambiguous choice in Search [1]: ReadersVersionSpecific_this.Reader[upickle.Gadt2.IsDir[V]] : choice=none
- (upickle.Gadt2.IsDir.rw : [V²] (implicit evidence$1: upickle.default.ReadWriter[V²]): upickle.default.ReadWriter[upickle.Gadt2.IsDir[V²]] )
- (upickle.default.superTypeReader : [T, V² >: T] (implicit evidence$1: scala.deriving.Mirror.ProductOf[T], evidence$2: upickle.default.Reader[V²], evidence$3: scala.deriving.Mirror.SumOf[V²], x$1: scala.util.NotGiven[upickle.core.CurrentlyDeriving[V²]]): upickle.default.Reader[T] ) Here're links to each of the types: No new compilation failures in OpenCB, |
Since we specialize implicits and generalize givens, it's logical that we can't compare givens and implicits.
OK, here's what goes on here.
|
Superseded by #21328 |
It applies the following tweaks: