Skip to content

Commit b877358

Browse files
authored
readme tweaks (#680)
* remove badge * provide coordinates in scala-cli/mill format too * etc
1 parent 933801c commit b877358

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
1-
[![scala-collection-compat Scala version support](https://index.scala-lang.org/scala/scala-collection-compat/scala-collection-compat/latest-by-scala-version.svg?platform=jvm)](https://index.scala-lang.org/scala/scala-collection-compat/scala-collection-compat)
2-
31
## Purpose and scope
42

53
This library makes some Scala 2.13 APIs available on Scala 2.11 and 2.12.
64

75
The idea is to facilitate
86
[cross-building](https://github.com/scala/collection-strawman/wiki/FAQ#how-do-i-cross-build-my-project-against-scala-212-and-scala-213)
9-
Scala 2.13 and 3.0 code on the older versions.
7+
Scala 2.13 code on the older versions.
108

11-
Although the name of the library is scala-"collection"-compat, we have now widened the scope to include other parts of the Scala 2.13/3.0 standard library besides just collections.
9+
Although the name of the library is scala-"collection"-compat, we have now widened the scope to include other parts of the Scala 2.13 standard library besides just collections.
1210

1311
Only the most commonly used APIs are supported; many are missing. Contributions are welcome.
1412

1513
## Usage
1614

17-
To use this library, add the following to your `build.sbt`:
15+
This library is available on the JVM, Scala.js, and Scala Native.
1816

19-
```
20-
libraryDependencies += "org.scala-lang.modules" %% "scala-collection-compat" % "<version>"
21-
```
17+
| tool | coordinates |
18+
|:---------------:|:------------:|
19+
| sbt | `"org.scala-lang.modules" %% "scala-collection-compat" % "<version>"` |
20+
| scala-cli, mill | `org.scala-lang.modules::scala-collection-compat:<version>` |
2221

2322
All future versions will remain backwards binary compatible with 2.0.0. (The 1.0.0 release was withdrawn and should not be used.)
2423

2524
## How it works
2625

27-
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+
The Scala 2.13 and Scala 3 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.
2827

2928
The 2.11 and 2.12 versions have the needed compatibility code in this package.
3029

@@ -109,9 +108,10 @@ scalacOptions += "-P:semanticdb:synthetics:on"
109108
```
110109

111110
### Fixing unused import warnings
111+
112112
In Scala 2.13 the `import scala.collection.compat._` sometimes is not needed (e.g. `.to(SeqType)` is natively available).
113113
This leads to a `unused import` warning under Scala 2.13 even though the import is required for Scala 2.12.
114-
In order to work around this, you can pass a compiler option to ignore this specific issue, e.g. in SBT:
114+
In order to work around this, you can pass a compiler option to ignore this specific issue, e.g. in sbt:
115115
```scala
116116
scalacOptions += "-Wconf:origin=scala.collection.compat.*:s"
117117
```

0 commit comments

Comments
 (0)