Skip to content

Commit e1abf93

Browse files
authored
Update scalafmt worker to be compatible with Scala 3 (#1354)
* Update scalafmt worker to be compatible with Scala 3
1 parent 9fe1a18 commit e1abf93

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

scala/scalafmt/scalafmt/ScalafmtWorker.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@ import org.scalafmt.Scalafmt
77
import org.scalafmt.config.Config
88
import org.scalafmt.util.FileOps
99
import scala.annotation.tailrec
10-
import scala.collection.JavaConverters._
1110
import scala.io.Codec
1211

1312
object ScalafmtWorker extends Worker.Interface {
1413

1514
def main(args: Array[String]): Unit = Worker.workerMain(args, ScalafmtWorker)
1615

17-
def work(args: Array[String]) {
16+
def work(args: Array[String]): Unit = {
1817
val argName = List("config", "input", "output")
1918
val argFile = args.map{x => new File(x)}
2019
val namespace = argName.zip(argFile).toMap

scala/scalafmt/scalafmt_repositories.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def scalafmt_repositories(
4040
"com_geirsson_metaconfig_core",
4141
"com_geirsson_metaconfig_typesafe_config",
4242
]
43-
if SCALA_MAJOR_VERSION == "2.13":
43+
if SCALA_MAJOR_VERSION == "2.13" or SCALA_MAJOR_VERSION == "3.1":
4444
artifact_ids.append("io_bazel_rules_scala_scala_parallel_collections")
4545

4646
repositories(

0 commit comments

Comments
 (0)