Skip to content

Commit

Permalink
Bump OS-Lib to 0.11.0 (#3684)
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi authored Oct 8, 2024
1 parent ebee7a0 commit 0427623
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.mill
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ object Deps {
val junitInterface = ivy"com.github.sbt:junit-interface:0.13.3"
val commonsIO = ivy"commons-io:commons-io:2.16.1"
val log4j2Core = ivy"org.apache.logging.log4j:log4j-core:2.23.1"
val osLib = ivy"com.lihaoyi::os-lib:0.10.7"
val osLib = ivy"com.lihaoyi::os-lib:0.11.0"
val pprint = ivy"com.lihaoyi::pprint:0.9.0"
val mainargs = ivy"com.lihaoyi::mainargs:0.7.4"
val millModuledefsVersion = "0.11.0"
Expand Down
5 changes: 2 additions & 3 deletions main/init/src/mill/init/InitModule.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package mill.init

import mainargs.{Flag, arg}
import mill.api.IO
import mill.define.{Discover, ExternalModule}
import mill.{Command, Module, T}

Expand Down Expand Up @@ -54,7 +53,7 @@ trait InitModule extends Module {
val extractedDirName = zipName.stripSuffix(".zip")
val downloaded = os.temp(requests.get(url))
println(s"Unpacking example...")
val unpackPath = IO.unpackZip(downloaded, os.rel)
val unpackPath = os.unzip(downloaded, T.dest)
val extractedPath = T.dest / extractedDirName
val conflicting = for {
p <- os.walk(extractedPath)
Expand All @@ -81,7 +80,7 @@ trait InitModule extends Module {
os.perms.set(T.workspace / "mill", "rwxrwxrwx")

(
Seq(unpackPath.path.toString()),
Seq(unpackPath.toString()),
s"Example download and unpacked to [${T.workspace}]; " +
"See `build.mill` for an explanation of this example and instructions on how to use it"
)
Expand Down
6 changes: 3 additions & 3 deletions scalalib/worker/src/mill/scalalib/worker/ZincWorkerImpl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -197,18 +197,18 @@ class ZincWorkerImpl(
os.makeDir.all(workingDir)
os.makeDir.all(compileDest)

val sourceFolder = mill.api.IO.unpackZip(compilerBridgeSourcesJar)(workingDir)
val sourceFolder = os.unzip(compilerBridgeSourcesJar, workingDir / "unpacked")
val classloader = mill.api.ClassLoader.create(
compilerClasspath.iterator.map(_.path.toIO.toURI.toURL).toSeq,
null
)(ctx0)

val (sources, resources) =
os.walk(sourceFolder.path).filter(os.isFile)
os.walk(sourceFolder).filter(os.isFile)
.partition(a => a.ext == "scala" || a.ext == "java")

resources.foreach { res =>
val dest = compileDest / res.relativeTo(sourceFolder.path)
val dest = compileDest / res.relativeTo(sourceFolder)
os.move(res, dest, replaceExisting = true, createFolders = true)
}

Expand Down

0 comments on commit 0427623

Please sign in to comment.