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
Copy file name to clipboardExpand all lines: README.md
+33-23Lines changed: 33 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -38,46 +38,56 @@ The library also adds backported versions of new collection types, currently `sc
38
38
39
39
## Migration Tool
40
40
41
-
We created two migration rules:
42
-
43
-
*`Collection213Upgrade` For upgrading applications (like web server, etc) from 2.11/2.12 to 2.13
44
-
*`Collection213CrossCompat` For library that wants to cross compile to 2.11, 2.12 and 2.13
45
-
46
-
The migration rules use scalafix. Please see the [official installation instruction](https://scalacenter.github.io/scalafix/docs/users/installation.html) and, in particular, check that your exact Scala version is supported.
41
+
The migration rules use scalafix. Please see the [official installation instruction](https://scalacenter.github.io/scalafix/docs/users/installation.html) and, in particular, check that your full Scala version is supported (ex 2.12.6).
The `Collection213Upgrade` rewrite upgrades to the 2.13 collections without the ability to compile the code-base with 2.12 or later. This rewrite is suitable for applications such as web servers that don't need to cross-compile against multiple Scala versions.
libraryDependencies += collectionCompat // required for Collection213CrossCompat
64
-
addCompilerPlugin(scalafixSemanticdb)
65
-
scalacOptions ++=List(
66
-
"-Yrangepos",
67
-
"-P:semanticdb:synthetics:on"// Required by the collection rewrites
68
-
)
69
66
70
-
scalafixDependencies in ThisBuild+="org.scala-lang.modules"%%"scala-collection-migrations"% collectionCompatVersion
71
-
```
67
+
The `Collections213CrossCompat` rewrite upgrades to the 2.13 collections without the ability to compile the code-base with 2.12 or later. This rewrite is suitable for libraries that are cross-published for multiple Scala versions.
68
+
69
+
To cross-build for 2.12 and 2.11, an additional module `scala-collection-compat` is required to provide missing extensions methods. This enables you to write your library using the latest 2.13 collections API while still supporting users on an older Scala version.
0 commit comments