-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Drop Scala 2.12 and sbt 1.3 (and 0.13.x leftovers) #10956
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
Conversation
@SethTisue as you are a Scala expert, is there something we should change here: playframework/core/play/src/main/scala/play/api/mvc/Action.scala Lines 99 to 101 in f18c239
? |
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.
Some minor comments, but it is LGTM, @mkurz!
...st/play-sbt-plugin/routes-compiler-injected-routes-compilation-with-request-passed/build.sbt
Show resolved
Hide resolved
This was done by @wsargent in c9d2b33 Dale found that Will wrote a longer explanation of what's going on here, in this GitHub comment: #6691 (comment) The SAM conversion rules are largely the same in 2.13 and 3 as they were in 2.12, but there are minor differences around the edges, e.g. in the interaction with overloading, but perhaps also in either areas. So it's conceivable that this is no longer needed somehow, but it's also highly plausible it is still needed and appropriate, so I'd say just leave it unless you're really interested in digging into it. |
Not interested 😆 |
Here is minimized example. class X1
class X2
class Request
class Result
trait BodyParser1[A] extends (X1 => A)
object ActionBuilder1 {
def apply[A](parser: BodyParser1[A]): X2 = ???
def apply[A](block: Request => Result): X2 = ???
}
trait BodyParser2[A] extends (X1 => A) {
self: Any => // avoid SAM
}
object ActionBuilder2 {
def apply[A](parser: BodyParser2[A]): X2 = ???
def apply[A](block: Request => Result): X2 = ???
}
object Main {
ActionBuilder1(a => ???) // "missing parameter type" error
ActionBuilder2(a => ???) // no error
} playframework/core/play/src/main/scala/play/api/mvc/Action.scala Lines 284 to 305 in 619b319
I think |
BTW
|
Thanks @xuwei-k!
We can have a look at this later when actually adding Scala 3 support for Play. |
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.
Looks good. Thanks @mkurz
Thanks Renato! |
No description provided.