-
Notifications
You must be signed in to change notification settings - Fork 87
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
Fixes for akka rewrite #100
Conversation
ran scalafix scala:fix.CrossCompat test:scalafix scala:fix.CrossCompat with scala/scala-collection-compat#100
|
||
object LinearSeqSrc { | ||
LinearSeq(1) | ||
} |
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.
We should still support this case
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.
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.
Still, I don’t understand why we remove it. We should leave it and improve/fix it later.
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.
No, if it's incorrect we should remove it. I'm using it to migrate akka, if we keep this rewrite in It's not possible to use scala-collection-compat to rewrite code.
@@ -45,17 +45,21 @@ trait Stable212Base extends CrossCompatibility { self: SemanticRule => | |||
val traversable = exact( | |||
"_root_.scala.package.Traversable#", | |||
"_root_.scala.collection.Traversable#", | |||
"_root_.scala.package.Iterable#", | |||
"_root_.scala.collection.Iterable#" |
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.
Why do we remove these?
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.
we use this to detect if we need to add the compat import for
ctx.replaceSymbols(
"scala.Traversable" -> "scala.Iterable",
"scala.collection.Traversable" -> "scala.collection.Iterable"
)
It was incorrectly adding compat import.
val linearSeqToList = | ||
ctx.replaceSymbols( | ||
"scala.collection.LinearSeq" -> "scala.collection.immutable.List", | ||
) |
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.
Why remove this rule?
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.
fix #87
With those changes, we can run the CrossCompat on Akka and compile the code without warning/errors and pass all the test.
Diff here:
MasseGuillaume/akka@279fa62