diff --git a/sbt-bridge/src/dotty/tools/xsbt/CompilerBridgeDriver.java b/sbt-bridge/src/dotty/tools/xsbt/CompilerBridgeDriver.java index 8a7f3ae2d22e..6c622063a141 100644 --- a/sbt-bridge/src/dotty/tools/xsbt/CompilerBridgeDriver.java +++ b/sbt-bridge/src/dotty/tools/xsbt/CompilerBridgeDriver.java @@ -29,13 +29,13 @@ public CompilerBridgeDriver(String[] scalacOptions, Output output) { super(); this.scalacOptions = scalacOptions; - if (!output.getSingleOutput().isPresent()) + if (!output.getSingleOutputAsPath().isPresent()) throw new IllegalArgumentException("output should be a SingleOutput, was a " + output.getClass().getName()); this.args = new String[scalacOptions.length + 2]; System.arraycopy(scalacOptions, 0, args, 0, scalacOptions.length); args[scalacOptions.length] = "-d"; - args[scalacOptions.length + 1] = output.getSingleOutput().get().getAbsolutePath(); + args[scalacOptions.length + 1] = output.getSingleOutputAsPath().get().toAbsolutePath().toString(); } private static final String StopInfoError = diff --git a/sbt-bridge/src/xsbt/CachedCompilerImpl.java b/sbt-bridge/src/xsbt/CachedCompilerImpl.java index 8ade3bf4b994..5a88ca4efaf2 100644 --- a/sbt-bridge/src/xsbt/CachedCompilerImpl.java +++ b/sbt-bridge/src/xsbt/CachedCompilerImpl.java @@ -26,7 +26,7 @@ public CachedCompilerImpl(String[] args, Output output) { throw new IllegalArgumentException("output should be a SingleOutput, was a " + output.getClass().getName()); this.outputArgs = - new String[] { "-d", ((SingleOutput) output).getOutputDirectory().getAbsolutePath() }; + new String[] { "-d", ((SingleOutput) output).getOutputDirectoryAsPath().toAbsolutePath().toString() }; } public String[] commandArguments(File[] sources) {