Skip to content

Commit

Permalink
Revert "Use scala jdk converters."
Browse files Browse the repository at this point in the history
This reverts commit 209e814.
  • Loading branch information
hujw4 committed Nov 22, 2024
1 parent d66a82b commit 856c749
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 10 deletions.
3 changes: 1 addition & 2 deletions build.mill
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ object Deps {
val sourcecode = ivy"com.lihaoyi::sourcecode::0.4.2"
val utest = ivy"com.lihaoyi::utest::0.8.4"
val expecty = ivy"com.eed3si9n.expecty::expecty::0.16.0"
val collectionCompact = ivy"org.scala-lang.modules::scala-collection-compat:2.9.0"
def scalaReflect(scalaVersion: String) = ivy"org.scala-lang:scala-reflect:$scalaVersion"
def scalaLibrary(version: String) = ivy"org.scala-lang:scala-library:${version}"
}
Expand Down Expand Up @@ -116,7 +115,7 @@ trait OsLibModule
}

trait OsModule extends OsLibModule { outer =>
def ivyDeps = Agg(Deps.geny, Deps.collectionCompact)
def ivyDeps = Agg(Deps.geny)
override def compileIvyDeps = T {
val scalaReflectOpt = Option.when(!ZincWorkerUtil.isDottyOrScala3(scalaVersion()))(
Deps.scalaReflect(scalaVersion())
Expand Down
4 changes: 2 additions & 2 deletions os/src/Path.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package os

import java.net.URI
import java.nio.file.Paths
import scala.jdk.CollectionConverters._
import collection.JavaConverters._
import scala.language.implicitConversions
import acyclic.skipped
import os.PathError.{InvalidSegment, NonCanonicalLiteral}
Expand Down Expand Up @@ -212,7 +212,7 @@ object BasePath {
}
}
def chunkify(s: java.nio.file.Path) = {
import scala.jdk.CollectionConverters._
import collection.JavaConverters._
s.iterator().asScala.map(_.toString).filter(_ != ".").filter(_ != "").toArray
}
}
Expand Down
2 changes: 1 addition & 1 deletion os/src/ProcessOps.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package os

import scala.jdk.CollectionConverters._
import collection.JavaConverters._
import java.lang.ProcessBuilder.Redirect
import os.SubProcess.InputStream
import java.io.IOException
Expand Down
2 changes: 1 addition & 1 deletion os/src/ReadWriteOps.scala
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ object write {
) = {
checker.value.onWrite(target)

import scala.jdk.CollectionConverters._
import collection.JavaConverters._
val permArray: Array[FileAttribute[_]] =
if (perms == null) Array.empty
else Array(PosixFilePermissions.asFileAttribute(perms.toSet()))
Expand Down
3 changes: 1 addition & 2 deletions os/src/ZipOps.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import java.net.URI
import java.nio.file.{FileSystem, FileSystems, Files}
import java.nio.file.attribute.{BasicFileAttributeView, FileTime, PosixFilePermissions}
import java.util.zip.{ZipEntry, ZipFile, ZipInputStream, ZipOutputStream}
import scala.jdk.CollectionConverters._

import scala.collection.JavaConverters._
import scala.util.matching.Regex

object zip {
Expand Down
2 changes: 1 addition & 1 deletion os/test/src-jvm/ZipOpJvmTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import utest._
import java.nio.file.attribute.FileTime
import java.nio.file.{Files, Paths}
import java.util.zip.ZipFile
import scala.jdk.CollectionConverters._
import scala.collection.JavaConverters._

object ZipOpJvmTests extends TestSuite {

Expand Down
2 changes: 1 addition & 1 deletion os/watch/src/WatchServiceWatcher.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import java.nio.file.StandardWatchEventKinds.{ENTRY_CREATE, ENTRY_DELETE, ENTRY_
import com.sun.nio.file.{ExtendedWatchEventModifier, SensitivityWatchEventModifier}

import scala.collection.mutable
import scala.jdk.CollectionConverters._
import collection.JavaConverters._
import scala.util.Properties.isWin

class WatchServiceWatcher(
Expand Down

0 comments on commit 856c749

Please sign in to comment.