Skip to content

Commit 81d0d33

Browse files
committed
bring readme up to date
1 parent 22780e8 commit 81d0d33

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

README.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ All future versions will remain backwards binary compatible with 2.0.0. (The 1.0
2222

2323
## How it works
2424

25+
The 2.13 and 3.0 versions consist only of an empty `scala.collection.compat` package object, so `import scala.collection.compat._` won't cause an error in cross-compiled code.
26+
27+
The 2.11 and 2.12 versions have the needed compatibility code in this package.
28+
29+
### Changed methods
30+
2531
The 2.13 collections redesign did not break source compatibility for most ordinary code, but there are some exceptions.
2632

2733
For example, the `to` method is used with a type parameter in 2.12:
@@ -37,15 +43,25 @@ import scala.collection.compat._
3743
xs.to(List)
3844
```
3945

40-
The 2.13 and 3.0 versions consist only of an empty `scala.collection.compat` package object, so `import scala.collection.compat._` won't cause an error in cross-compiled code.
41-
42-
The 2.11 and 2.12 versions have the needed compatibility code in this package.
46+
### New collections
4347

4448
The library also adds backported versions of new collection types, such as `immutable.ArraySeq` and `immutable.LazyList`. (On 2.13, these types are just aliases to standard library types.)
4549

46-
And it adds backported versions of some 2.13 collections methods such as `maxOption`.
50+
### New collection methods
51+
52+
Support is included for some 2.13 collections methods such as `maxOption`.
53+
54+
### Other new classes
55+
56+
Support is included for some non-collections classes, such as:
57+
58+
* `@nowarn` annotation, added in 2.13.2 and 2.12.13. (The 2.11 `@nowarn` doesn't do anything, but its presence facilitates cross-compilation.)
59+
60+
### Other new methods
61+
62+
Support is included for some other methods, such as:
4763

48-
And, it includes support for some non-collections classes such as the `@nowarn` annotation added in 2.13.2.
64+
* `toIntOption` (and `Long`, et al) on `String`
4965

5066
## Migration rules
5167

@@ -68,7 +84,7 @@ scalacOptions += "-P:semanticdb:synthetics:on"
6884
```bash
6985
// sbt shell
7086
> scalafixEnable
71-
> scalafixAll dependency:Collection213Upgrade@org.scala-lang.modules:scala-collection-migrations:<version>
87+
> scalafixAll dependency:Collection213Upgrade@org.scala-lang.modules:scala-collection-migrations:<version>
7288
```
7389

7490
### Collection213CrossCompat
@@ -87,7 +103,7 @@ scalacOptions += "-P:semanticdb:synthetics:on"
87103
```bash
88104
// sbt shell
89105
> scalafixEnable
90-
> scalafixAll dependency:Collection213CrossCompat@org.scala-lang.modules:scala-collection-migrations:<version>
106+
> scalafixAll dependency:Collection213CrossCompat@org.scala-lang.modules:scala-collection-migrations:<version>
91107
```
92108

93109
### Fixing unused import warnings

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy