Skip to content

Compiling files from multiple disks crashes the compiler #10763

Closed
@CherryWorm

Description

@CherryWorm

Having an intellij project anywhere but on the C: drive unfortunately crashes the compiler right now, due to the ivy and coursier caches being on the C: drive by default. These can be changed, however I don't believe that that should be necessary, as this will probably cause issues in more scenarios.

The stacktrace:

scalac: Error: 'other' has different root
java.lang.IllegalArgumentException: 'other' has different root
	at java.base/sun.nio.fs.WindowsPath.relativize(WindowsPath.java:404)
	at java.base/sun.nio.fs.WindowsPath.relativize(WindowsPath.java:42)
	at dotty.tools.dotc.transform.PostTyper$PostTyperTransformer.transform(PostTyper.scala:346)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform$$anonfun$2(Trees.scala:1369)
	at scala.collection.immutable.List.mapConserve(List.scala:472)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1369)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transformStats(Trees.scala:1367)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1354)
	at dotty.tools.dotc.transform.MacroTransform$Transformer.transform(MacroTransform.scala:54)
	at dotty.tools.dotc.transform.PostTyper$PostTyperTransformer.transform(PostTyper.scala:417)
	at dotty.tools.dotc.transform.MacroTransform.run(MacroTransform.scala:21)
	at dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:296)
	at scala.collection.immutable.List.map(List.scala:246)
	at dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:297)
	at dotty.tools.dotc.Run.runPhases$4$$anonfun$4(Run.scala:185)
	at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
	at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
	at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1323)
	at dotty.tools.dotc.Run.runPhases$5(Run.scala:195)
	at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:203)
	at dotty.runtime.function.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
	at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:67)
	at dotty.tools.dotc.Run.compileUnits(Run.scala:210)
	at dotty.tools.dotc.Run.compileSources(Run.scala:147)
	at dotty.tools.dotc.Run.compile(Run.scala:129)
	at dotty.tools.dotc.Driver.doCompile(Driver.scala:38)
	at dotty.tools.dotc.Driver.process(Driver.scala:193)
	at dotty.tools.dotc.Main.process(Main.scala)
	at xsbt.CachedCompilerImpl.run(CachedCompilerImpl.java:69)
	at xsbt.CompilerInterface.run(CompilerInterface.java:41)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at sbt.internal.inc.AnalyzingCompiler.invoke(AnalyzingCompiler.scala:315)
	at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:110)
	at org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:57)
	at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:43)
	at org.jetbrains.jps.incremental.scala.remote.Main$.compileLogic(Main.scala:158)
	at org.jetbrains.jps.incremental.scala.remote.Main$.$anonfun$handleCommand$1(Main.scala:141)
	at org.jetbrains.jps.incremental.scala.remote.Main$.decorated$1(Main.scala:131)
	at org.jetbrains.jps.incremental.scala.remote.Main$.handleCommand(Main.scala:138)
	at org.jetbrains.jps.incremental.scala.remote.Main$.serverLogic(Main.scala:115)
	at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:71)
	at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions