-
Notifications
You must be signed in to change notification settings - Fork 594
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
Scala 3: Remove 3.0-migration compiler option from all modules #4114
Conversation
@@ -7,6 +7,7 @@ | |||
import akka.http.impl.model.JavaQuery; | |||
import akka.http.impl.model.UriJavaAccessor; | |||
import akka.http.scaladsl.model.*; | |||
import akka.http.javadsl.model.HttpCharset; |
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.
This is interesting - before adding this import Scala 3 incorrectly resolved javadsl.model.HttpCharset as scaladsl.model.HttpCharset, causing problems in classes that inherit Query.
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.
That sounds like a bug in the Java support of Scala 3, doesn't it? Wouldn't it be a problem if javac and scalac disagree about how names are resolved in Java source files?
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.
I agree, It also seems like the root of the previous problems with scaladsl and javadsl type inference. Before this I couldn't find a minimization for that issue, but now it seems clear. I'll try making one and file an issue (hopefully also today).
akka-http-core/src/test/scala/akka/http/impl/engine/client/HostConnectionPoolSpec.scala
Show resolved
Hide resolved
akka-http-tests/src/test/scala/akka/http/scaladsl/server/directives/FutureDirectivesSpec.scala
Show resolved
Hide resolved
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.
This is great! Thanks, @jchyb. The only thing which might make sense is moving the compat things to akka.http.ccompat
.
|
||
import scala.collection.immutable.StringOps | ||
|
||
object CompatUtils { |
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.
Can you move that to akka.http.ccompat
where the other compatibility methods are?
akka-http-core/src/main/scala/akka/http/scaladsl/settings/ServerSettings.scala
Show resolved
Hide resolved
@@ -7,6 +7,7 @@ | |||
import akka.http.impl.model.JavaQuery; | |||
import akka.http.impl.model.UriJavaAccessor; | |||
import akka.http.scaladsl.model.*; | |||
import akka.http.javadsl.model.HttpCharset; |
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.
That sounds like a bug in the Java support of Scala 3, doesn't it? Wouldn't it be a problem if javac and scalac disagree about how names are resolved in Java source files?
akka-http-tests/src/test/scala/akka/http/scaladsl/server/directives/FutureDirectivesSpec.scala
Show resolved
Hide resolved
ImplicitUtils object was added, to mitigate issues with StringOps implicit conversions (and the use of * operator on Strings).
26d4d9a
to
523d358
Compare
Nice, thanks! |
References #4079, task
Make compilation work without 3.0-migration compiler option