From 98afde4eca9e0233d2139518daa5fcbad8a2dc1c Mon Sep 17 00:00:00 2001 From: Martin Mauch Date: Sat, 15 Oct 2022 20:34:26 +0200 Subject: [PATCH] Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index c3e64ded..20cb925e 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,14 @@ scalacOptions += "-P:semanticdb:synthetics:on" > scalafixAll dependency:Collection213CrossCompat@org.scala-lang.modules:scala-collection-migrations: ``` +### Fixing unused import warnings +In Scala 2.13 the `import scala.collection.compat._` sometimes is not needed (e.g. `.to(SeqType)` is natively available). +This leads to a `unused import` warning under Scala 2.13 even though the import is required for Scala 2.12. +In order to work around this, you can pass a compiler option to ignore this specific issue, e.g. in SBT: +```scala +scalacOptions += "-Wconf:origin=scala.collection.compat.*:s" +``` + ### Contributing The migration tool is not exhaustive. Contributions of additional rewrites are welcome. If you encounter a use case that’s not supported, please report it as described in the [contributing