-
Notifications
You must be signed in to change notification settings - Fork 21
Scalac bug when calculating the LUB of akka.http.scaladsl.model.MediaTypes fields #9621
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
Comments
Imported From: https://issues.scala-lang.org/browse/SI-9621?orig=1 |
Konrad Malawski (konrad.malawski) said: This would be interesting to get a rough estimate if it's a big problem to fix or we should look into working around it, thanks in advance! |
@adriaanm said:
|
Konrad Malawski (konrad.malawski) said: |
Konrad Malawski (konrad.malawski) said: If you want a reproducer Rudiger's link works well, and you can update the Akka version there to 2.0.2 to see that "oh now it works" in case that helps debugging. |
sounds like this was just a duplicate of #1409? though then I'm not sure why it wasn't closed earlier. in any case, it's been a while so I think we should presume this is closeable as a duplicate unless someone wants to say otherwise. |
The members of
akka.http.scaladsl.model.MediaTypes
have different types. Some are of typeMediaType.WithOpenCharset
while others are of typeMediaType.WithFixedCharset
. Using them in isolation works fine, but when scalac is asked to calculate the LUB of both types, it blows up in the most peculiar way. This can be worked around by declaring the type explicitly.Here is a repo with a tiny reproducer https://github.com/rklaehn/invaliddependency
It is probably of interest that ContentType.WithFixedCharset and ContentType.WithOpenCharset are inner interfaces declared in a java class
https://github.com/akka/akka/blob/84fd5a9b2a4ebc1dcfe1cda8c072023ba84b44a0/akka-http-core/src/main/java/akka/http/javadsl/model/MediaType.java
The text was updated successfully, but these errors were encountered: