Skip to content

Commit

Permalink
use scala-collection-compat for scala 2.12-
Browse files Browse the repository at this point in the history
  • Loading branch information
mpollmeier committed Mar 14, 2023
1 parent e93cbdc commit 0b8bfef
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 411 deletions.
11 changes: 8 additions & 3 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ object Deps {
val acyclic = ivy"com.lihaoyi:::acyclic:0.3.6"
val jna = ivy"net.java.dev.jna:jna:5.13.0"
val geny = ivy"com.lihaoyi::geny::1.0.0"
val scalaCollectionCompat = ivy"org.scala-lang.modules::scala-collection-compat::2.9.0"
val sourcecode = ivy"com.lihaoyi::sourcecode::0.3.0"
val utest = ivy"com.lihaoyi::utest::0.8.1"
def scalaLibrary(version: String) = ivy"org.scala-lang:scala-library:${version}"
Expand Down Expand Up @@ -173,9 +174,13 @@ trait OsLibTestModule extends ScalaModule with TestModule.Utest with SafeDeps {

trait OsModule extends OsLibModule {
override def artifactName = "os-lib"
override def ivyDeps = Agg(
Deps.geny
)
override def ivyDeps = T {
val scalaV = scalaVersion()
if (scalaV.startsWith("2.11") || scalaV.startsWith("2.12")) {
// include collection compat, mostly for a backported scala.util.Using
Agg(Deps.geny, Deps.scalaCollectionCompat)
} else Agg(Deps.geny)
}
}

trait WatchModule extends OsLibModule {
Expand Down
2 changes: 1 addition & 1 deletion os/src/TempOps.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package os

import java.nio.file.attribute.{FileAttribute, PosixFilePermissions}
import os.util.Using
import scala.util.Using

/**
* Create temporary files and directories. [[withFile]] and [[withDir]]
Expand Down
Loading

0 comments on commit 0b8bfef

Please sign in to comment.