Skip to content

Commit 9b61de7

Browse files
committed
Supress deprecation warnings
1 parent ac8afae commit 9b61de7

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

sbt-bridge/src/dotty/tools/xsbt/CompilerBridgeDriver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ public CompilerBridgeDriver(String[] scalacOptions, Output output) {
2929
super();
3030
this.scalacOptions = scalacOptions;
3131

32-
if (!output.getSingleOutput().isPresent())
32+
if (!output.getSingleOutputAsPath().isPresent())
3333
throw new IllegalArgumentException("output should be a SingleOutput, was a " + output.getClass().getName());
3434

3535
this.args = new String[scalacOptions.length + 2];
3636
System.arraycopy(scalacOptions, 0, args, 0, scalacOptions.length);
3737
args[scalacOptions.length] = "-d";
38-
args[scalacOptions.length + 1] = output.getSingleOutput().get().getAbsolutePath();
38+
args[scalacOptions.length + 1] = output.getSingleOutputAsPath().get().toAbsolutePath().toString();
3939
}
4040

4141
private static final String StopInfoError =

sbt-bridge/src/xsbt/CachedCompilerImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
import dotty.tools.xsbt.InterfaceCompileFailed;
1515
import dotty.tools.xsbt.DelegatingReporter;
1616

17+
// deprecation warnings are suppressed because scala3-sbt-bridge must stay compatible with Zinc 1.3
18+
// see https://github.com/lampepfl/dotty/issues/10816
19+
@SuppressWarnings("deprecation")
1720
public class CachedCompilerImpl implements CachedCompiler {
1821
private final String[] args;
1922
private final String[] outputArgs;

sbt-dotty/sbt-test/sbt-bridge/zinc-13-compat/src/main/scala/Main.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import org.apache.logging.log4j.LogManager
77

88
import xsbti._
99
import xsbti.api.ClassLike
10+
import xsbti.api.DependencyContext
1011
import xsbti.compile.DependencyChanges
1112

1213
import sbt.internal.util.ManagedLogger

0 commit comments

Comments
 (0)