mill icon indicating copy to clipboard operation
mill copied to clipboard

'other' has different root

Open kthompson opened this issue 3 years ago • 0 comments

adding a predefScript(on windows) at C:\Users\Kevin\.mill\ammonite\predefScript.sc and then running build from another volume ie

E:\code\work\test > mill resolve __

Results in 'other' has different root exception.

❯ mill resolve __
Compiling C:\Users\Kevin\.mill\ammonite\predefScript.sc
java.lang.IllegalArgumentException: 'other' has different root
  sun.nio.fs.WindowsPath.relativize(WindowsPath.java:404)
  sun.nio.fs.WindowsPath.relativize(WindowsPath.java:42)
  os.Path.relativeTo(Path.scala:456)
  mill.main.MainRunner$CustomCodeWrapper$.apply(MainRunner.scala:178)
  ammonite.interp.Preprocessor$.wrapCode(Preprocessor.scala:141)
  ammonite.interp.DefaultPreprocessor.$anonfun$transform$2(DefaultPreprocessor.scala:46)
  ammonite.util.Res$Success.map(Res.scala:67)
  ammonite.interp.DefaultPreprocessor.transform(DefaultPreprocessor.scala:42)
  ammonite.interp.Interpreter.compileRunBlock$1(Interpreter.scala:518)
  ammonite.interp.Interpreter.$anonfun$processAllScriptBlocks$15(Interpreter.scala:568)
  ammonite.util.Res$Success.flatMap(Res.scala:62)
  ammonite.interp.Interpreter.$anonfun$processAllScriptBlocks$14(Interpreter.scala:565)
  ammonite.util.Res$Success.flatMap(Res.scala:62)
  ammonite.interp.Interpreter.$anonfun$processAllScriptBlocks$12(Interpreter.scala:562)
  scala.Option.getOrElse(Option.scala:201)
  ammonite.interp.Interpreter.loop$1(Interpreter.scala:562)
  ammonite.interp.Interpreter.processAllScriptBlocks(Interpreter.scala:600)
  ammonite.interp.Interpreter.$anonfun$processModule$6(Interpreter.scala:395)
  ammonite.util.Catching.flatMap(Res.scala:115)
  ammonite.interp.Interpreter.$anonfun$processModule$5(Interpreter.scala:386)
  ammonite.util.Res$Success.flatMap(Res.scala:62)
  ammonite.interp.Interpreter.processModule(Interpreter.scala:376)
  ammonite.interp.Interpreter.$anonfun$initializePredef$3(Interpreter.scala:140)
  ammonite.interp.Interpreter.$anonfun$initializePredef$3$adapted(Interpreter.scala:140)
  ammonite.interp.PredefInitialization$.$anonfun$apply$2(PredefInitialization.scala:79)
  ammonite.util.Res$.$anonfun$fold$1(Res.scala:32)
  scala.collection.LinearSeqOps.foldLeft(LinearSeq.scala:168)
  scala.collection.LinearSeqOps.foldLeft$(LinearSeq.scala:164)
  scala.collection.immutable.List.foldLeft(List.scala:79)
  ammonite.util.Res$.fold(Res.scala:30)
  ammonite.interp.PredefInitialization$.apply(PredefInitialization.scala:67)
  ammonite.interp.Interpreter.initializePredef(Interpreter.scala:142)
  ammonite.Main.$anonfun$instantiateInterpreter$1(Main.scala:189)
  scala.util.Either$RightProjection.flatMap(Either.scala:757)
  ammonite.Main.instantiateInterpreter(Main.scala:146)
  mill.main.MainRunner.$anonfun$runScript$2(MainRunner.scala:108)
  mill.main.RunScript$.runScript(RunScript.scala:43)
  mill.main.MainRunner.$anonfun$runScript$1(MainRunner.scala:115)
  mill.main.MainRunner.watchLoop2(MainRunner.scala:64)
  mill.main.MainRunnerFailed to connect to server

kthompson avatar Aug 04 '20 21:08 kthompson