Skip to content

Commit

Permalink
document tested support for Scala3 LTS & Scala3 Next
Browse files Browse the repository at this point in the history
  • Loading branch information
bjaglin committed Aug 22, 2024
1 parent c676683 commit fe2bbdd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 9 additions & 7 deletions docs/users/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ title: Installation

## Support

**macOS, Linux or Windows**
Scalafix is tested to work with:

**Java LTS (8, 11, 17 or 21)**
* **macOS, Linux or Windows**
* **Java LTS (8, 11, 17 or 21)**
* **Scala @SCALA212@, @SCALA213@ or @SCALA3LTS@ or @SCALA3NEXT@**

**Scala 2.12, 2.13 or 3.x**
Note that other setups may work, but could result in unexpected behavior.

## sbt

Expand Down Expand Up @@ -83,7 +85,7 @@ the Scala compiler option `-Ywarn-unused-import` (or `-Wunused:imports` in
*/
inThisBuild(
List(
scalaVersion := "@SCALA212@", // @SCALA213@, or 3.x
scalaVersion := "@SCALA212@", // @SCALA213@, @SCALA3LTS@ or @SCALA3NEXT@
+ semanticdbEnabled := true, // enable SemanticDB
+ semanticdbVersion := scalafixSemanticdb.revision // only required for Scala 2.x
)
Expand All @@ -106,7 +108,7 @@ the Scala compiler option `-Ywarn-unused-import` (or `-Wunused:imports` in
* https://www.scala-sbt.org/1.x/docs/sbt-1.3-Release-Notes.html#SemanticDB+support
*/
lazy val myproject = project.settings(
scalaVersion := "@SCALA212@", // @SCALA213@, or 3.x
scalaVersion := "@SCALA212@", // @SCALA213@, @SCALA3LTS@ or @SCALA3NEXT@
+ semanticdbEnabled := true, // enable SemanticDB
+ semanticdbVersion := scalafixSemanticdb.revision, // only required for Scala 2.x
+ scalacOptions += {
Expand Down Expand Up @@ -403,7 +405,7 @@ settings `scalacOptions` and `allDependencies` contain the values below.
...
> show allDependencies
...
[info] List(..., org.scalameta:semanticdb-scalac:@SCALA212@:plugin->default(compile), ...)
[info] List(..., org.scalameta:semanticdb-scalac:@SCALA213@:plugin->default(compile), ...)
...
```

Expand Down Expand Up @@ -464,5 +466,5 @@ If using the sbt plugin
If using the command-line interface

```sh
cs launch ch.epfl.scala:scalafix-cli_@SCALA212@:@NIGHTLY_VERSION@ -r sonatype:snapshots --main scalafix.cli.Cli -- --help
cs launch ch.epfl.scala:scalafix-cli_@SCALA213@:@NIGHTLY_VERSION@ -r sonatype:snapshots --main scalafix.cli.Cli -- --help
```
2 changes: 2 additions & 0 deletions scalafix-docs/src/main/scala/docs/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ sidebar_label: Guide
.withSiteVariables(
Map(
"SEMANTICDB" -> "[SemanticDB](https://scalameta.org/docs/semanticdb/specification.html)",
"SCALA3NEXT" -> Versions.scala3Next.split('.').take(2).mkString("", ".", ".x"),
"SCALA3LTS" -> Versions.scala3LTS.split('.').take(2).mkString("", ".", ".x"),
"SCALA213" -> Versions.scala213,
"SCALA212" -> Versions.scala212,
"NIGHTLY_VERSION" -> Versions.version,
Expand Down

0 comments on commit fe2bbdd

Please sign in to comment.