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
+35-22
Original file line number
Diff line number
Diff line change
@@ -38,45 +38,58 @@ 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
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 2.11. This rewrite is suitable for applications that don't need to cross-compile against multiple Scala versions.
libraryDependencies += collectionCompat // required for Collection213CrossCompat
62
-
addCompilerPlugin(scalafixSemanticdb)
63
-
scalacOptions ++=List(
64
-
"-Yrangepos",
65
-
"-Ywarn-unused-import",
66
-
"-P:semanticdb:synthetics:on"
67
-
)
67
+
The `Collections213CrossCompat` rewrite upgrades to the 2.13 collections with 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
68
69
-
scalafixDependencies in ThisBuild+="org.scala-lang.modules"%%"scala-collection-migrations"%Dependencies.collectionCompatVersion
69
+
To cross-build for 2.12 and 2.11, the rewrite rule introduces a dependency on the scala-collection-compat module, which provides the syntax of 2.13 on 2.12 and 2.11. 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