You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make Context.current a transparent inline to make it work under Scala 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
0 commit comments