-
-
Notifications
You must be signed in to change notification settings - Fork 413
Closed
Labels
Milestone
Description
I'm checking compilation locally to reduce CI job runs (that's a different story though).
When I re-run a compilation (mill contrib.flyway.compile
), I get an error - which I can solve by killing the only "java.exe" process. This stackoverflow answer helped me get the compilation running again. Windows wouldn't let me delete the Jar:
mill contrib.flyway.compile
...
[info] done compiling
[99/365] de.tobiasroeser.mill.vcs.version.VcsVersion.vcsState.overridden.de.tobiasroeser.mill.vcs.version.VcsVersion.vcsState
[177/365] main.moduledefs.manifest
Exception in thread "MillServerActionRunner" java.nio.file.FileSystemException: C:\Users\user\mill\out\main\moduledefs\jar.dest\out.jar: The process cannot access the file because it is being used by another process
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:275)
at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
at java.base/java.nio.file.Files.deleteIfExists(Files.java:1191)
at os.remove$.apply(FileOps.scala:290)
at os.remove$.apply(FileOps.scala:284)
at os.remove$all$.$anonfun$apply$5(FileOps.scala:301)
at os.remove$all$.$anonfun$apply$5$adapted(FileOps.scala:301)
at geny.Generator.$anonfun$foreach$1(Generator.scala:50)
at geny.Generator$Mapped.$anonfun$generate$4(Generator.scala:283)
at os.walk$stream$$anon$2$$anon$3.visitFile(ListOps.scala:249)
at os.walk$stream$$anon$2$$anon$3.visitFile(ListOps.scala:230)
at java.base/java.nio.file.Files.walkFileTree(Files.java:2811)
at os.walk$stream$$anon$2.generate(ListOps.scala:230)
at geny.Generator$Mapped.generate(Generator.scala:283)
at geny.Generator.foreach(Generator.scala:49)
at geny.Generator.foreach$(Generator.scala:49)
at geny.Generator$Mapped.foreach(Generator.scala:281)
at os.remove$all$.apply(FileOps.scala:301)
at mill.eval.Evaluator.evaluateGroupCached(Evaluator.scala:463)
at mill.eval.Evaluator.$anonfun$sequentialEvaluate$2(Evaluator.scala:202)
at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:563)
at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:561)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1293)
at mill.eval.Evaluator.sequentialEvaluate(Evaluator.scala:177)
at mill.eval.Evaluator.evaluate(Evaluator.scala:162)
at mill.main.RunScript$.evaluateNamed(RunScript.scala:364)
at mill.main.RunScript$.evaluate(RunScript.scala:349)
at mill.main.RunScript$.$anonfun$evaluateTasks$1(RunScript.scala:314)
at scala.util.Either.map(Either.scala:382)
at mill.main.RunScript$.evaluateTasks(RunScript.scala:312)
at mill.main.RunScript$.$anonfun$runScript$8(RunScript.scala:105)
at ammonite.util.Res$Success.flatMap(Res.scala:62)
at mill.main.RunScript$.runScript(RunScript.scala:104)
at mill.main.MainRunner.$anonfun$runScript$1(MainRunner.scala:119)
at mill.main.MainRunner.watchLoop2(MainRunner.scala:67)
at mill.main.MainRunner.runScript(MainRunner.scala:92)
at mill.MillMain$.main0(MillMain.scala:310)
at mill.main.MillServerMain$.main0(MillServerMain.scala:79)
at mill.main.Server.$anonfun$handleRun$1(MillServerMain.scala:183)
at java.base/java.lang.Thread.run(Thread.java:833)
I've worked around it for now. I raised this in case someone else gets the same compilation problems on Windows.