You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
In Scala <= 2.12, a non-fqn Seq referenced the mutable structure scala.collection.Seq[+A]. As of 2.13, this changed so it now references the immutable scala.collection.immutable.Seq[A]. To compile against 2.13, some change needs to be made against the code. What should that change be?
Describe the solution you'd like
I see a few options for this:
explicitly change unqualified uses of Seq as a type to be mutable.Seq to preserve mutable semantics. The primary drawback to this is that callers of the methods that have this return type that use unqualified Seq as a return type will also have to update their code to the same when migrating to 2.13.
leave the unqualified uses of Seq as a type they are, and add explicit .toSeq on return values. This is a no-op for mutable structures (like ListBuffer) in 2.12, but will have the effect of creating a new container object of type Seq in 2.13.
Change parameters to be Iterable (sometimes bad, since a caller could pass an infinite iterable). Leave return types as Seq and add .toSeq on return values as in (2)
Describe alternatives you've considered
n/a
Additional context
n/a
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
In Scala <= 2.12, a non-fqn Seq referenced the mutable structure
scala.collection.Seq[+A]
. As of 2.13, this changed so it now references the immutablescala.collection.immutable.Seq[A]
. To compile against 2.13, some change needs to be made against the code. What should that change be?Describe the solution you'd like
I see a few options for this:
explicitly change unqualified uses of
Seq
as a type to bemutable.Seq
to preserve mutable semantics. The primary drawback to this is that callers of the methods that have this return type that use unqualifiedSeq
as a return type will also have to update their code to the same when migrating to 2.13.leave the unqualified uses of
Seq
as a type they are, and add explicit.toSeq
on return values. This is a no-op for mutable structures (like ListBuffer) in 2.12, but will have the effect of creating a new container object of type Seq in 2.13.Change parameters to be
Iterable
(sometimes bad, since a caller could pass an infinite iterable). Leave return types as Seq and add.toSeq
on return values as in (2)Describe alternatives you've considered
n/a
Additional context
n/a
The text was updated successfully, but these errors were encountered: