-
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
activate constrainResult fix in 3.4 #19253
activate constrainResult fix in 3.4 #19253
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
I am not sure whether the note should belong to the section “Error reporting improvements” or “Changes with compatibility issues”, but here is a first suggestion:
That being said, it seems #18130, which introduces the |
…la 3.4.+ (#189) It fixes compilation, and possibly usage for users of the `Context.current` due to scala/scala3#19253 Issue spotted by Scala 3 Open Community Build - [logs](https://github.com/VirtusLab/community-build3/actions/runs/10058953806/job/27803320280) Since 3.4.0 it would fail with: ```scala [error] -- [E172] Type Error: /Users/wmazur/projects/community-build3/repo/ducktape/src/main/scala/io/github/arainko/ducktape/internal/Planner.scala:274:32 [error] 274 | ctx.reifyPlan[F](plan) [error] | ^ [error] |Cannot prove that io.github.arainko.ducktape.internal.Plan[ [error] | io.github.arainko.ducktape.internal.Erroneous, ctx.F] =:= io.github.arainko.ducktape.internal.Plan[ [error] | io.github.arainko.ducktape.internal.Erroneous, F²]. [error] | [error] |where: F is a type in class PossiblyFallible which is an alias of io.github.arainko.ducktape.internal.Fallible [error] | F² is a type in method unapply with bounds <: io.github.arainko.ducktape.internal.Fallible [error] -- [E172] Type Error: /Users/wmazur/projects/community-build3/repo/ducktape/src/main/scala/io/github/arainko/ducktape/internal/Planner.scala:296:11 [error] 296 | } [error] | ^ [error] |Cannot prove that io.github.arainko.ducktape.internal.Plan[ [error] | io.github.arainko.ducktape.internal.Erroneous, ctx.F] =:= io.github.arainko.ducktape.internal.Plan[ [error] | io.github.arainko.ducktape.internal.Erroneous, F²]. [error] | [error] |where: F is a type in class PossiblyFallible which is an alias of io.github.arainko.ducktape.internal.Fallible [error] | F² is a type in method unapply with bounds <: io.github.arainko.ducktape.internal.Fallible [error] -- [E172] Type Error: /Users/wmazur/projects/community-build3/repo/ducktape/src/main/scala/io/github/arainko/ducktape/internal/Planner.scala:315:11 [error] 315 | } [error] | ^ [error] |Cannot prove that io.github.arainko.ducktape.internal.Plan[ [error] | io.github.arainko.ducktape.internal.Erroneous, ctx.F] =:= io.github.arainko.ducktape.internal.Plan[ [error] | io.github.arainko.ducktape.internal.Erroneous, F²]. [error] | [error] |where: F is a type in class PossiblyFallible which is an alias of io.github.arainko.ducktape.internal.Fallible [error] | F² is a type in method unapply with bounds <: io.github.arainko.ducktape.internal.Fallible ``` The constraint might be also applicable for other `current` methods used to summon implicit, eg. `Mode.current` but I've not spotted any problems with it so far
fixes #18174
Release Notes
Type inference has changed for
inline
methods in 3.4, which can cause a source incompatibility at the call site. The previous behaviour can be recovered in an affected file withalternatively the definition can changed to
transparent inline
, but as this is a TASTy breaking change it is not a default recommendation. (Alsoinline
should be preferred when possible overtransparent inline
for reduced binary size)