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
Compile without fatal warnings on 2.13.0 #2891
Conversation
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.
If we gave Request
this treatment, we might consider doing the same to Response
for symmetry, though I don't think there were any binary changes here, so then again, maybe not. Discuss.
val headers: Headers = Headers.empty, | ||
val body: EntityBody[F] = EmptyBody, | ||
val attributes: Vault = Vault.empty | ||
) extends Message[F] with Product with Serializable { |
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'm not a huge fan of these interfaces, but:
Product
makes hash code easier and was there before.- Spark folks may be depending on
Serializable
. I don't judge.
case _ => false | ||
}) | ||
|
||
def canEqual(that: Any) = that.isInstanceOf[Request[F]] |
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 F
is erased and I'm surprised this didn't generate a warning but _
didn't work. Maybe _[_]
? Ugh.
The unapply on Request seems to fail < 2.13 |
Maybe this would help: https://github.com/alexarchambault/data-class |
I just mentioned data-class on another ticket. 😄 It's can also be a compile-time only dependency, which makes it more attractive for our use case. I'm running out of time for the night, but I'll give that a poke tomorrow. |
I tried doing this now, and it failed with conflict on |
Seems like the only change needed for this to work is changing the pattern match for
|
@rossabaker Should I create a new PR to get this moving again? |
@hamnis That would be wonderful. Thank you! |
Superseded by #2933. |
Adapted @rossabaker's patch in #2891 to make it work for 2.12 as well
Request
by hand to work around False positive unreachable code warning with sealed abstract class scala/bug#11457.Seq
aliasing in a spec