akka / akka-http

The Streaming-first HTTP server/module of Akka
https://doc.akka.io/docs/akka-http
Other
1.34k stars 595 forks source link

Error compiling with 2.13.0-RC1 #2515

Closed lrytz closed 5 years ago

lrytz commented 5 years ago

Check out current master (04eb7550c)

In sbt:

akka-http-root > set every scalaVersion := "2.13.0-RC1"
akka-http-root > set every scalaBinaryVersion := "2.13.0-M5"
akka-http-root > compile
...
[error] /Users/luc/scala/akka-http/akka-http-core/src/main/scala/akka/http/impl/model/parser/CommonRules.scala:111:55: diverging implicit expansion for type akka.parboiled2.support.ActionOps.SJoin[akka.shapeless.HNil,Int :: Int :: akka.shapeless.HNil,Int]
[error] starting with method terminate in object Aux
[error]   def date2 = rule { day ~ '-' ~ month ~ '-' ~ digit2 ~> (y ⇒ if (y <= 69) y + 2000 else y + 1900) }
[error]                                                       ^

I got the same error on the community build (https://scala-ci.typesafe.com/job/scala-2.13.x-integrate-community-build/2018/console).

lrytz commented 5 years ago

@raboof / @jrudolph would be really nice if someone could look into this 😊 it's on the path to getting playframework in the community build green.

raboof commented 5 years ago

I won't pretend I understand exactly what's going on here, but adding explicit parens seemed to help for me:

def date2 = rule { day ~ '-' ~ month ~ '-' ~ (digit2 ~> (y ⇒ if (y <= 69) y + 2000 else y + 1900)) }
lrytz commented 5 years ago

Thanks, I will use that for now. Leaving this ticket open.

lrytz commented 5 years ago

More chnages for RC1 here: https://github.com/scalacommunitybuild/akka-http/commits/community-build-2.13

jrudolph commented 5 years ago

I won't pretend I understand exactly what's going on here, but adding explicit parens seemed to help for me:

Maybe some precedence rules changed? Anyway the extra parens make it more readable anyway.

lrytz commented 5 years ago

Maybe some precedence rules changed?

I think not, with -Xprint:parser, the trees are the same in 2.12.8 and 2.13.0-RC1.

lrytz commented 5 years ago

Moved here: https://github.com/scala/bug/issues/11516

adriaanm commented 5 years ago

Note that this will also hit in 2.12, I think, since the change in behavior landed in 2.13 as a merge from 2.12 (more info in ticket).

dwijnand commented 5 years ago

Fixed here in #2525