-
-
Notifications
You must be signed in to change notification settings - Fork 286
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
add "import scala.jdk.CollectionConverters" option in scalapb compiler-plugin? #598
Comments
As a similar problem, default |
Alternatively, create custom compat converter object in scalapb-runtime 🤔 |
@thesamet There is such an interface.
final case class AnyList(values: _root_.scala.collection.Seq[String]) In 2.12, the default Seq is
So this worked. case class MyList(values: Seq[String])
MyList(AnyList().values) In contrast, in 2.13 it has been changed to
so conversion by case class MyList(values: Seq[String])
MyList(AnyList().values.toSeq) Since this breaks compatibility with 2.12, I think it is preferable to change the automatically generated code to |
@giiita Both |
scala.collection.JavaConverters
deprecated since Scala 2.13.I think we should add new option for which class to use
scala.jdk.CollectionConverters
orscala.collection.JavaConverters
for avoid deprecation warnings.something like
ScalaPB/compiler-plugin/src/main/scala/scalapb/compiler/ProtobufGenerator.scala
Lines 1651 to 1652 in 34993f9
The text was updated successfully, but these errors were encountered: