Skip to content
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

Rewrite rules for @deprecated since 2.13.x #44

Open
MasseGuillaume opened this issue Jun 18, 2018 · 6 comments
Open

Rewrite rules for @deprecated since 2.13.x #44

MasseGuillaume opened this issue Jun 18, 2018 · 6 comments
Labels
rewrite Related to rewrite rules (not compat library code)

Comments

@MasseGuillaume
Copy link
Contributor

MasseGuillaume commented Jun 18, 2018

methods deprecated as of 2.13.0

[ ] scala.collection.generic

  @deprecated("Clearable was moved from collection.generic to collection.mutable", "2.13.0")
  [X] type Clearable = scala.collection.mutable.Clearable

  @deprecated("Use scala.collection.BuildFrom instead", "2.13.0")
  [ ] type CanBuildFrom[-From, -A, +C] = scala.collection.BuildFrom[From, A, C]

[ ] scala.collection

  @deprecated("Use Iterable instead of Traversable", "2.13.0")
  [X] type Traversable[+X] = Iterable[X]

  @deprecated("Use Iterable instead of Traversable", "2.13.0")
  [X] val Traversable = Iterable

  @deprecated("Use IterableOnce instead of TraversableOnce", "2.13.0")
  [X] type TraversableOnce[+X] = IterableOnce[X]

  @deprecated("Use IterableOnce instead of TraversableOnce", "2.13.0")
  [X] val TraversableOnce = IterableOnce

  @deprecated("Use SeqOps instead of SeqLike", "2.13.0")
  [ ] type SeqLike[A, T] = SeqOps[A, Seq, T]

  @deprecated("Use SeqOps (for the methods) or IndexedSeqOps (for fast indexed access) instead of ArrayLike", "2.13.0")
  [ ] type ArrayLike[A] = SeqOps[A, Seq, Seq[A]]

  @deprecated("Gen* collection types have been removed", "2.13.0")
  [ ] type GenTraversableOnce[+X] = IterableOnce[X]

  @deprecated("Gen* collection types have been removed", "2.13.0")
  [ ] val GenTraversableOnce = IterableOnce

  @deprecated("Gen* collection types have been removed", "2.13.0")
  [ ] type GenTraversable[+X] = Iterable[X]

  @deprecated("Gen* collection types have been removed", "2.13.0")
  [ ] val GenTraversable = Iterable

  @deprecated("Gen* collection types have been removed", "2.13.0")
  [ ] type GenIterable[+X] = Iterable[X]

  @deprecated("Gen* collection types have been removed", "2.13.0")
  [ ] val GenIterable = Iterable

  @deprecated("Gen* collection types have been removed", "2.13.0")
  [ ] type GenSeq[+X] = Seq[X]

  @deprecated("Gen* collection types have been removed", "2.13.0")
  [ ] val GenSeq = Seq

  @deprecated("Gen* collection types have been removed", "2.13.0")
  [ ] type GenSet[X] = Set[X]

  @deprecated("Gen* collection types have been removed", "2.13.0")
  [ ] val GenSet = Set

  @deprecated("Gen* collection types have been removed", "2.13.0")
  [ ] type GenMap[K, +V] = Map[K, V]

  @deprecated("Gen* collection types have been removed", "2.13.0")
  [ ] val GenMap = Map

  [ ] @deprecated("DefaultMap is no longer necessary; extend Map directly", "2.13.0")
  [ ] trait DefaultMap[K, +V] extends Map[K, V]

  [ ] Searching

    [ ] @deprecated("Search methods are defined directly on SeqOps and do not require scala.collection.Searching any more", "2.13.0")
    [ ] class SearchImpl[Repr, A](private val coll: SeqOps[A, AnyConstr, _]) extends AnyVal

    [ ] @deprecated("Search methods are defined directly on SeqOps and do not require scala.collection.Searching any more", "2.13.0")
    [ ] implicit def search[Repr, A](coll: Repr)(implicit fr: IsSeqLike[Repr]): SearchImpl[Repr, fr.A]

  [ ] Seq

    @deprecated("Use `concat` instead", "2.13.0")
    [ ] @inline final def union[B >: A, That](that: Seq[B]): CC[B] = concat(that)

    @deprecated("Use segmentLength instead of prefixLength", "2.13.0")
    [ ] @`inline` final def prefixLength(p: A => Boolean): Int = segmentLength(p, 0)

    @deprecated("Use .reverseIterator.map(f).to(...) instead of .reverseMap(f)", "2.13.0")
    [ ] def reverseMap[B](f: A => B): CC[B] = fromIterable(new View.Map(View.fromIteratorProvider(() => reverseIterator), f))

  [ ] Set

    @deprecated("Use &~ or diff instead of --", "2.13.0")
    [ ] @`inline` final def -- (that: Set[A]): C = diff(that)

    @deprecated("Consider requiring an immutable Set or fall back to Set.diff", "2.13.0")
    [ ] def - (elem: A): C = diff(Set(elem))

    @deprecated("Use &- with an explicit collection argument instead of - with varargs", "2.13.0")
    [ ] def - (elem1: A, elem2: A, elems: A*): C = diff(elems.toSet + elem1 + elem2)

    @deprecated("Consider requiring an immutable Set or fall back to Set.union", "2.13.0")
    [ ] def + (elem: A): C = fromSpecificIterable(new View.Appended(toIterable, elem))

    @deprecated("Use ++ with an explicit collection argument instead of + with varargs", "2.13.0")
    [ ] def + (elem1: A, elem2: A, elems: A*): C = fromSpecificIterable(new View.Concat(new View.Appended(new View.Appended(toIterable, elem1), elem2), elems))

  [ ] SortedMap

    @deprecated("Consider requiring an immutable Map or fall back to Map.concat", "2.13.0")
    [ ] override def + [V1 >: V](kv: (K, V1)): CC[K, V1] = sortedMapFactory.from(new View.Appended(toIterable, kv))

    @deprecated("Use ++ with an explicit collection argument instead of + with varargs", "2.13.0")
    [ ] override def + [V1 >: V](elem1: (K, V1), elem2: (K, V1), elems: (K, V1)*): CC[K, V1] = sortedMapFactory.from(new View.Concat(new View.Appended(new View.Appended(toIterable, elem1), elem2), elems))

  [ ] SortedOps

    @deprecated("Use rangeFrom", "2.13.0")
    [ ] final def from(from: A): C = rangeFrom(from)

    @deprecated("Use rangeUntil", "2.13.0")
    [ ] final def until(until: A): C = rangeUntil(until)

    @deprecated("Use rangeTo", "2.13.0")
    [ ] final def to(to: A): C = rangeTo(to)

  StringOps
    @deprecated("Use `new WrappedString(s).diff(...).self` instead of `s.diff(...)`", "2.13.0")
    [ ] def diff(that: Seq[_ >: Char]): String = new WrappedString(s).diff(that).self

    @deprecated("Use `new WrappedString(s).intersect(...).self` instead of `s.intersect(...)`", "2.13.0")
    [ ] def intersect(that: Seq[_ >: Char]): String = new WrappedString(s).intersect(that).self

    @deprecated("Use `new WrappedString(s).distinct.self` instead of `s.distinct`", "2.13.0")
    [ ] def distinct: String = new WrappedString(s).distinct.self

    @deprecated("Use `new WrappedString(s).distinctBy(...).self` instead of `s.distinctBy(...)`", "2.13.0")
    [ ] def distinctBy[B](f: Char => B): String = new WrappedString(s).distinctBy(f).self

    @deprecated("Use `new WrappedString(s).sorted.self` instead of `s.sorted`", "2.13.0")
    [ ] def sorted[B >: Char](implicit ord: Ordering[B]): String = new WrappedString(s).sorted(ord).self

    @deprecated("Use `new WrappedString(s).sortWith(...).self` instead of `s.sortWith(...)`", "2.13.0")
    [ ] def sortWith(lt: (Char, Char) => Boolean): String = new WrappedString(s).sortWith(lt).self

    @deprecated("Use `new WrappedString(s).sortBy(...).self` instead of `s.sortBy(...)`", "2.13.0")
    [ ] def sortBy[B](f: Char => B)(implicit ord: Ordering[B]): String = new WrappedString(s).sortBy(f)(ord).self

    @deprecated("Use `new WrappedString(s).groupBy(...).mapValues(_.self)` instead of `s.groupBy(...)`", "2.13.0")
    [ ] def groupBy[K](f: Char => K): immutable.Map[K, String] = new WrappedString(s).groupBy(f).mapValues(_.self).toMap

    @deprecated("Use `new WrappedString(s).sliding(...).map(_.self)` instead of `s.sliding(...)`", "2.13.0")
    [ ] def sliding(size: Int, step: Int = 1): Iterator[String] = new WrappedString(s).sliding(size, step).map(_.self)

    @deprecated("Use `new WrappedString(s).combinations(...).map(_.self)` instead of `s.combinations(...)`", "2.13.0")
    [ ] def combinations(n: Int): Iterator[String] = new WrappedString(s).combinations(n).map(_.self)

    @deprecated("Use `new WrappedString(s).permutations(...).map(_.self)` instead of `s.permutations(...)`", "2.13.0")
    [ ] def permutations: Iterator[String] = new WrappedString(s).permutations.map(_.self)

  View

    @deprecated("Views no longer know about their underlying collection type; .force always returns an IndexedSeq", "2.13.0")
    [ ] @`inline` def force: IndexedSeq[A] = toIndexedSeq


  Iterable
    @deprecated("Iterable.seq always returns the iterable itself", "2.13.0")
    [ ] def seq: this.type = this

    [ ] @deprecated("Use .knownSize >=0 instead of .hasDefiniteSize", "2.13.0")
    [ ] @`inline` final def hasDefiniteSize = knownSize >= 0

    @deprecated("Use .view.slice(from, until) instead of .view(from, until)", "2.13.0")
    [ ] @`inline` final def view(from: Int, until: Int): View[A]

  IterableOnce
    @deprecated("Use .iterator.foreach(...) instead of .foreach(...) on IterableOnce", "2.13.0")
    [ ] @`inline` def foreach[U](f: A => U): Unit

    @deprecated("Use factory.from(it) instead of it.to(factory) for IterableOnce", "2.13.0")
    [ ] def to[C1](factory: Factory[A, C1]): C1

    @deprecated("Use ArrayBuffer.from(it) instead of it.toBuffer", "2.13.0")
    [ ] def toBuffer[B >: A]: mutable.Buffer[B]

    @deprecated("Use ArrayBuffer.from(it).toArray", "2.13.0")
    [ ] def toArray[B >: A: ClassTag]: Array[B]

    @deprecated("Use List.from(it) instead of it.toList", "2.13.0")
    [ ] def toList: immutable.List[A] = immutable.List.from(it)

    @deprecated("Use Set.from(it) instead of it.toSet", "2.13.0")
    [ ] @`inline` def toSet[B >: A]: immutable.Set[B] = immutable.Set.from(it)

    @deprecated("Use Iterable.from(it) instead of it.toIterable", "2.13.0")
    [ ] @`inline` final def toIterable: Iterable[A] = Iterable.from(it)

    @deprecated("Use Seq.from(it) instead of it.toSeq", "2.13.0")
    [ ] @`inline` def toSeq: immutable.Seq[A] = immutable.Seq.from(it)

    @deprecated("Use Stream.from(it) instead of it.toStream", "2.13.0")
    [ ] @`inline` def toStream: immutable.Stream[A] = immutable.Stream.from(it)

    @deprecated("Use Vector.from(it) instead of it.toVector on IterableOnce", "2.13.0")
    [ ] @`inline` def toVector: immutable.Vector[A] = immutable.Vector.from(it)

    @deprecated("Use Map.from(it) instead of it.toMap on IterableOnce", "2.13.0")
    [ ] def toMap[K, V](implicit ev: A <:< (K, V)): immutable.Map[K, V]

    @deprecated("toIterator has been renamed to iterator", "2.13.0")
    [ ] @`inline` def toIterator: Iterator[A] = it.iterator

    @deprecated("Use .iterator.isEmpty instead of .isEmpty on IterableOnce", "2.13.0")
    [ ] def isEmpty: Boolean

    @deprecated("Use .iterator.mkString instead of .mkString on IterableOnce", "2.13.0")
    [ ] def mkString(start: String, sep: String, end: String): String

    @deprecated("Use .iterator.mkString instead of .mkString on IterableOnce", "2.13.0")
    [ ] def mkString(sep: String): String

    @deprecated("Use .iterator.mkString instead of .mkString on IterableOnce", "2.13.0")
    [ ] def mkString: String = it match

    @deprecated("Use .iterator.find instead of .find on IterableOnce", "2.13.0")
    [ ] def find(p: A => Boolean): Option[A]

    @deprecated("Use .iterator.foldLeft instead of .foldLeft on IterableOnce", "2.13.0")
    [ ] @`inline` def foldLeft[B](z: B)(op: (B, A) => B): B

    @deprecated("Use .iterator.foldRight instead of .foldLeft on IterableOnce", "2.13.0")
    [ ] @`inline` def foldRight[B](z: B)(op: (A, B) => B): B

    @deprecated("Use .iterator.fold instead of .fold on IterableOnce", "2.13.0")
    [ ] def fold[A1 >: A](z: A1)(op: (A1, A1) => A1): A1

    @deprecated("Use .iterator.foldLeft instead of /: on IterableOnce", "2.13.0")
    [ ] @`inline` def /: [B](z: B)(op: (B, A) => B): B

    @deprecated("Use .iterator.foldRight instead of :\\ on IterableOnce", "2.13.0")
    [ ] @`inline` def :\ [B](z: B)(op: (A, B) => B): B

    @deprecated("Use .iterator.map instead of .map on IterableOnce or consider requiring an Iterable", "2.13.0")
    [ ] def map[B](f: A => B): IterableOnce[B]

    @deprecated("Use .iterator.flatMap instead of .flatMap on IterableOnce or consider requiring an Iterable", "2.13.0")
    [ ] def flatMap[B](f: A => IterableOnce[B]): IterableOnce[B]

    @deprecated("Use .iterator.sameElements for sameElements on Iterable or IterableOnce", "2.13.0")
    [ ] def sameElements[B >: A](that: IterableOnce[B]): Boolean

Map

  @deprecated("Use - or remove on an immutable Map", "2.13.0")
  [ ] def - (key: K): Map[K, V]

  @deprecated("Use -- or removeAll on an immutable Map", "2.13.0")
  [ ] def - (key1: K, key2: K, keys: K*): Map[K, V]

TreeMap

  @deprecated("Use `updated` instead", "2.13.0")
  [ ] def insert[V1 >: V](key: K, value: V1): TreeMap[K, V1]

AnyRefMap

  @deprecated("Consider requiring an immutable Map or fall back to Map.concat", "2.13.0")
  [ ] override def + [V1 >: V](kv: (K, V1)): AnyRefMap[K, V1] = AnyRefMap.from(new View.Appended(toIterable, kv))

  @deprecated("Use ++ with an explicit collection argument instead of + with varargs", "2.13.0")
  [ ] override def + [V1 >: V](elem1: (K, V1), elem2: (K, V1), elems: (K, V1)*): AnyRefMap[K, V1] = AnyRefMap.from(new View.Concat(new View.Appended(new View.Appended(toIterable, elem1), elem2), elems))

  @deprecated("Use AnyRefMap.from(m).add(k,v) instead of m.updated(k, v)", "2.13.0")
  [ ] def updated[V1 >: V](key: K, value: V1): AnyRefMap[K, V1] = {

mutable
  @deprecated("Use ArraySeq instead of WrappedArray; it can represent both, boxed and unboxed arrays", "2.13.0")
  [ ] type WrappedArray[X] = ArraySeq[X]
  
  @deprecated("Use ArraySeq instead of WrappedArray; it can represent both, boxed and unboxed arrays", "2.13.0")
  [ ] val WrappedArray = ArraySeq
  
  @deprecated("Use Iterable instead of Traversable", "2.13.0")
  [ ] type Traversable[X] = Iterable[X]
  
  @deprecated("Use Iterable instead of Traversable", "2.13.0")
  [ ] val Traversable = Iterable
  
  @deprecated("Use Stack instead of ArrayStack; it now uses an array-based implementation", "2.13.0")
  [ ] type ArrayStack[X] = Stack[X]
  
  @deprecated("Use Stack instead of ArrayStack; it now uses an array-based implementation", "2.13.0")
  [ ] val ArrayStack = Stack

  @deprecated("mutable.LinearSeq has been removed; use LinearSeq with mutable.Seq instead", "2.13.0")
  [ ] type LinearSeq[X] = Seq[X] with scala.collection.LinearSeq[X]

  @deprecated("GrowingBuilder has been renamed to GrowableBuilder", "2.13.0")
  [ ] type GrowingBuilder[Elem, To <: Growable[Elem]] = GrowableBuilder[Elem, To]

  @deprecated("Use an immutable.ListMap assigned to a var instead of mutable.ListMap", "2.13.0")
  [ ] class ListMap[K, V]

  @deprecated("Use HashMap or one of the specialized versions (LongMap, AnyRefMap) instead of OpenHashMap", "2.13.0")
  [ ] object OpenHashMap

  [ ] Buffer

    @deprecated("Use .addOne or += instead of .append", "2.13.0")
    [ ] @`inline` final def append(elem: A): this.type = addOne(elem)

  [ ] Builder

    @deprecated("Use reverseInPlace instead", "2.13.0")
    [ ] final def reverseContents(): this.type = reverseInPlace()

  [ ] StringBuilder
    @deprecated("Use `new StringBuilder()` instead of `StringBuilder.newBuilder`", "2.13.0")
    [ ] def newBuilder = new StringBuilder

  [ ] IterableOps
    @deprecated("Use `mapInPlace` instead", "2.13.0")
    [ ] @`inline`final def transform(f: A => A): this.type = mapInPlace(f)

    @deprecated("Use xs ++ ys instead of ys ++: xs for xs of type Iterable", "2.13.0")
    [ ] def ++:[B >: A](that: IterableOnce[B]): IterableCC[B] =

  [ ] LongMap
    @deprecated("Consider requiring an immutable Map or fall back to Map.concat", "2.13.0")
    [ ] override def +[V1 >: V](kv: (Long, V1)): LongMap[V1] = {

    @deprecated("Use ++ with an explicit collection argument instead of + with varargs", "2.13.0")
    [ ] override def + [V1 >: V](elem1: (Long, V1), elem2: (Long, V1), elems: (Long, V1)*): LongMap[V1]

    @deprecated("Use LongMap.from(m).add(k,v) instead of m.updated(k, v)", "2.13.0")
    [ ] def updated[V1 >: V](key: Long, value: V1): LongMap[V1] = {


  [ ] Map

    @deprecated("Use - or remove on an immutable Map", "2.13.0")
    [ ] def - (key: K): C = clone() -= key

    @deprecated("Use -- or removeAll on an immutable Map", "2.13.0")
    [ ] def - (key1: K, key2: K, keys: K*): C = clone() -= key1 -= key2 --= keys

    @deprecated("Use .filterInPlace instead of .retain", "2.13.0")
    [X] def retain(p: (K, V) => Boolean): this.type = filterInPlace(p.tupled)

  [X] Set

    @deprecated("Use .filterInPlace instead of .retain", "2.13.0")
    [X] @`inline` final def retain(p: A => Boolean): this.type = filterInPlace(p)
  


[ ] scala.concurrent

  Future
    @deprecated("use Future.foldLeft instead", "2.12.0")
    [ ] def fold[T, R](futures: IterableOnce[Future[T]])(zero: R)(@deprecatedName('foldFun) op: (R, T) => R)(implicit executor: ExecutionContext): Future[R]

    @deprecated("use Future.reduceLeft instead", "2.12.0")
    [ ] def reduce[T, R >: T](futures: IterableOnce[Future[T]])(op: (R, T) => R)(implicit executor: ExecutionContext): Future[R] = {


[ ] scala.math

  @deprecated("This is an integer type; there is no reason to round it. Perhaps you meant to call this with a floating-point value?", "2.11.0")
  [ ] def round(x: Long): Long = x

  Ordering
    @deprecated("There are multiple ways to order Floats (Ordering.Float.TotalOrdering, " +
    "Ordering.Float.IeeeOrdering). Specify one by using a local import, assigning an implicit val, or passing it " +
    "explicitly. See the documentation for details.", since = "2.13.0")
    [ ] implicit object DeprecatedFloatOrdering extends Float.TotalOrdering

    @deprecated("There are multiple ways to order Doubles (Ordering.Double.TotalOrdering, " +
    "Ordering.Double.IeeeOrdering). Specify one by using a local import, assigning an implicit val, or passing it " +
    "explicitly. See the documentation for details.", since = "2.13.0")
    [ ] implicit object DeprecatedDoubleOrdering extends Double.TotalOrdering

[ ] scala.runtime

  [ ] RichInt
    @deprecated("this is an integer type; there is no reason to round it.  Perhaps you meant to call this on a floating-point value?", "2.11.0")
    [ ] def round: Int = self

  [ ] RichLong
    @deprecated("this is an integer type; there is no reason to round it.  Perhaps you meant to call this on a floating-point value?", "2.11.0")
    [ ] def round: Long = self

[ ] scala.sys.process

  [ ] ProcessBuilder

    @deprecated("use lazyLines", since = "2.13.0")
    [ ] def lineStream: Stream[String]

    @deprecated("use lazyLines", since = "2.13.0")
    [ ] def lineStream(capacity: Integer): Stream[String]

    @deprecated("use lazyLines", since = "2.13.0")
    [ ] def lineStream(log: ProcessLogger): Stream[String]

    @deprecated("use lazyLines", since = "2.13.0")
    [ ] def lineStream(log: ProcessLogger, capacity: Integer): Stream[String]

    @deprecated("use lazyLines_!", since = "2.13.0")
    [ ] def lineStream_! : Stream[String]

    @deprecated("use lazyLines_!", since = "2.13.0")
    [ ] def lineStream_!(capacity: Integer): Stream[String]

    @deprecated("use lazyLines_!", since = "2.13.0")
    [ ] def lineStream_!(log: ProcessLogger): Stream[String]

    @deprecated("use lazyLines_!", since = "2.13.0")
    [ ] def lineStream_!(log: ProcessLogger, capacity: Integer): Stream[String]


[ ] Predef

  @deprecated("Implicit conversions from Array to immutable.IndexedSeq are implemented by copying; Use the more efficient non-copying ArraySeq.unsafeWrapArray or an explicit toIndexedSeq call", "2.13.0")
  [ ] implicit def copyArrayToImmutableIndexedSeq[T](xs: Array[T]): IndexedSeq[T]

[X] Byte
  @deprecated("Adding a number and a String is deprecated. Convert the number to a String with `toString` first to call +", "2.13.0")
  [X] def +(x: String): String

  @deprecated("shifting a value by a `Long` argument is deprecated (except when the value is a `Long`).\nCall `toInt` on the argument to maintain the current behavior and avoid the deprecation warning.", "2.12.7")
  [X] def <<(x: Long): Int

  @deprecated("shifting a value by a `Long` argument is deprecated (except when the value is a `Long`).\nCall `toInt` on the argument to maintain the current behavior and avoid the deprecation warning.", "2.12.7")
  [X] def >>>(x: Long): Int

  @deprecated("shifting a value by a `Long` argument is deprecated (except when the value is a `Long`).\nCall `toInt` on the argument to maintain the current behavior and avoid the deprecation warning.", "2.12.7")
  [X] def >>(x: Long): Int

[X] Char

  @deprecated("Adding a number and a String is deprecated. Convert the number to a String with `toString` first to call +", "2.13.0")
  [X] def +(x: String): String

  @deprecated("shifting a value by a `Long` argument is deprecated (except when the value is a `Long`).\nCall `toInt` on the argument to maintain the current behavior and avoid the deprecation warning.", "2.12.7")
  [X] def <<(x: Long): Int

  @deprecated("shifting a value by a `Long` argument is deprecated (except when the value is a `Long`).\nCall `toInt` on the argument to maintain the current behavior and avoid the deprecation warning.", "2.12.7")
  [X] def >>>(x: Long): Int

  @deprecated("shifting a value by a `Long` argument is deprecated (except when the value is a `Long`).\nCall `toInt` on the argument to maintain the current behavior and avoid the deprecation warning.", "2.12.7")
  [X] def >>(x: Long): Int

[X] Int
  @deprecated("Adding a number and a String is deprecated. Convert the number to a String with `toString` first to call +", "2.13.0")
  [X] def +(x: String): String

  @deprecated("shifting a value by a `Long` argument is deprecated (except when the value is a `Long`).\nCall `toInt` on the argument to maintain the current behavior and avoid the deprecation warning.", "2.12.7")
  [X] def <<(x: Long): Int

  @deprecated("shifting a value by a `Long` argument is deprecated (except when the value is a `Long`).\nCall `toInt` on the argument to maintain the current behavior and avoid the deprecation warning.", "2.12.7")
  [X] def >>>(x: Long): Int

  @deprecated("shifting a value by a `Long` argument is deprecated (except when the value is a `Long`).\nCall `toInt` on the argument to maintain the current behavior and avoid the deprecation warning.", "2.12.7")
  [X] def >>(x: Long): Int
  
[X] Short

  @deprecated("Adding a number and a String is deprecated. Convert the number to a String with `toString` first to call +", "2.13.0")
  [X] def +(x: String): String

  @deprecated("shifting a value by a `Long` argument is deprecated (except when the value is a `Long`).\nCall `toInt` on the argument to maintain the current behavior and avoid the deprecation warning.", "2.12.7")
  [X] def <<(x: Long): Int

  @deprecated("shifting a value by a `Long` argument is deprecated (except when the value is a `Long`).\nCall `toInt` on the argument to maintain the current behavior and avoid the deprecation warning.", "2.12.7")
  [X] def >>>(x: Long): Int

  @deprecated("shifting a value by a `Long` argument is deprecated (except when the value is a `Long`).\nCall `toInt` on the argument to maintain the current behavior and avoid the deprecation warning.", "2.12.7")
  [X] def >>(x: Long): Int

[X] Double

  @deprecated("Adding a number and a String is deprecated. Convert the number to a String with `toString` first to call +", "2.13.0")
  [X] def +(x: String): String

[X] Float

  @deprecated("Adding a number and a String is deprecated. Convert the number to a String with `toString` first to call +", "2.13.0")
  [X] def +(x: String): String

[X] Long

  @deprecated("Adding a number and a String is deprecated. Convert the number to a String with `toString` first to call +", "2.13.0")
  [X] def +(x: String): String


[X] Function

  // @deprecated("use `f.tupled` instead")
  [X] def tupled[a1, a2, b](f: (a1, a2) => b): Tuple2[a1, a2] => b
  [X] def tupled[a1, a2, a3, b](f: (a1, a2, a3) => b): Tuple3[a1, a2, a3] => b
  [X] def tupled[a1, a2, a3, a4, b](f: (a1, a2, a3, a4) => b): Tuple4[a1, a2, a3, a4] => b
  [X] def tupled[a1, a2, a3, a4, a5, b](f: (a1, a2, a3, a4, a5) => b): Tuple5[a1, a2, a3, a4, a5] => b

[X] scala
  @deprecated("Use IterableOnce instead of TraversableOnce", "2.13.0")
  [X] type TraversableOnce[+A] = scala.collection.IterableOnce[A]

  @deprecated("Use Iterable instead of Traversable", "2.13.0")
  [X] type Traversable[+A] = scala.collection.Iterable[A]

  @deprecated("Use Iterable instead of Traversable", "2.13.0")
  [X] val Traversable = scala.collection.Iterable

  @deprecated("Use scala.collection.BufferedIterator instead of scala.BufferedIterator", "2.13.0")
  [X] type BufferedIterator[+A] = scala.collection.BufferedIterator[A]
@julienrf julienrf modified the milestone: 2.13.0-M5 Jun 22, 2018
@MasseGuillaume MasseGuillaume changed the title migrate all @deprecation migrate all 2.13 @deprecation Jul 11, 2018
@MasseGuillaume MasseGuillaume changed the title migrate all 2.13 @deprecation Rewrite rules for @deprecation since 2.13.x Jul 11, 2018
@MasseGuillaume MasseGuillaume changed the title Rewrite rules for @deprecation since 2.13.x Rewrite rules for @deprecated since 2.13.x Jul 11, 2018
@szeiger szeiger added the rewrite Related to rewrite rules (not compat library code) label Apr 5, 2019
@ViliusN

This comment has been minimized.

@NthPortal
Copy link
Contributor

@MasseGuillaume the round methods don't need rewrite rules - they are deprecated because there's no other good way to produce a compiler warning for using them, not because there was ever a point in time where it was reasonable to use them.

@NthPortal
Copy link
Contributor

NthPortal commented Jun 30, 2019

@ViliusN if you'd like to know more about why there are multiple ways to order Doubles, I recommend reading the docs for Ordering.Double. If you want more excruciating detail, you can read the discussions on scala/scala#6323 and scala/scala#6410.

Also, it's not nice to say that the maintainers and contributors have ruined the language. A lot of people have put a lot of time and effort into improving the language and fixing dozens and dozens of bugs. If you have constructive criticism, you can voice it on Gitter or start a thread to discuss it on the Contributors Forum.

@ViliusN

This comment has been minimized.

martijnhoekstra pushed a commit to martijnhoekstra/scala-collection-compat that referenced this issue Nov 9, 2022
@ekrich
Copy link
Contributor

ekrich commented Sep 14, 2023

I am wondering if it is easy to fix this one for 2.12? I had mutable.ArrayStack for 2.12. Now 2.13 deprecates that so we change ArrayStack back to Stack and now this is deprecated for 2.12.

[warn] /Users/eric/workspace/sconfig/sconfig/shared/src/main/scala/org/ekrich/config/impl/PathBuilder.scala:12:40:
class Stack in package mutable is deprecated (since 2.12.0): Stack is an inelegant and potentially
poorly-performing wrapper around List. Use a List assigned to a var instead.
[warn]   final private val keys = new mutable.Stack[String]

I am using a -Wconf for it and I doubt I will have any performance problems - maybe I will drop 2.12 soon.

@SethTisue
Copy link
Member

@scala/collections

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rewrite Related to rewrite rules (not compat library code)
Projects
None yet
Development

No branches or pull requests

7 participants