Skip to content
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

Merged
merged 2 commits into from
Apr 28, 2022

Conversation

jchyb
Copy link
Contributor

@jchyb jchyb commented Apr 25, 2022

References #4079, task Make compilation work without 3.0-migration compiler option

@@ -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;
Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Contributor Author

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).

Copy link
Member

@jrudolph jrudolph left a 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 {
Copy link
Member

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?

@@ -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;
Copy link
Member

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?

@jrudolph jrudolph mentioned this pull request Apr 26, 2022
22 tasks
ImplicitUtils object was added, to mitigate issues with StringOps
implicit conversions (and the use of * operator on Strings).
@jrudolph jrudolph merged commit ab826ed into akka:scala-3 Apr 28, 2022
@jrudolph
Copy link
Member

Nice, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants