Skip to content

Commit

Permalink
Warn users rt caching may take a while.
Browse files Browse the repository at this point in the history
  • Loading branch information
robby-phd committed Mar 28, 2018
1 parent 0da406e commit cf81275
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions main/src/mill/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ object Main {
stderr.println("Build repl needs to be run with the -i/--interactive flag")
(false, stateCache)
}else{
// Init rt cache here
if (mill.clientserver.ClientServer.isJava9OrAbove)
Export.rtAt(cliConfig.home.toIO, true)
val tqs = "\"\"\""
val config =
if(!repl) cliConfig
Expand All @@ -122,6 +119,14 @@ object Main {
stateCache
)

if (mill.clientserver.ClientServer.isJava9OrAbove) {
val rt = cliConfig.home / Export.rtJarName
if (!exists(rt)) {
runner.printInfo(s"Preparing Java ${System.getProperty("java.version")} runtime; this may take a minute or two ...")
Export.rtTo(rt.toIO, false)
}
}

if (repl){
runner.printInfo("Loading...")
(runner.watchLoop(isRepl = true, printing = false, _.run()), runner.stateCache)
Expand Down

0 comments on commit cf81275

Please sign in to comment.