Skip to content

Commit

Permalink
chore revert fix for #615 and apply sbt/sbt#5522
Browse files Browse the repository at this point in the history
  • Loading branch information
slandelle committed Jun 20, 2022
1 parent ef516b8 commit 04445b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 28 deletions.
13 changes: 4 additions & 9 deletions src/main/java/sbt_inc/SbtIncrementalCompiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
import scala.Tuple2;
import scala_maven.MavenArtifactResolver;
import util.FileUtils;
import util.JavaVersion;
import xsbti.FileConverter;
import xsbti.PathBasedFile;
import xsbti.T2;
import xsbti.VirtualFile;
Expand Down Expand Up @@ -118,7 +116,9 @@ public Optional<CompileAnalysis> analysis(VirtualFile classpathEntry) {

@Override
public DefinesClass definesClass(VirtualFile classpathEntry) {
return Locate.definesClass(classpathEntry);
return classpathEntry.name().equals("rt.jar")
? className -> false
: Locate.definesClass(classpathEntry);
}
};

Expand Down Expand Up @@ -158,11 +158,6 @@ public void compile(
fullClasspath.add(classesDirectory);
fullClasspath.addAll(classpathElements);

Optional<FileConverter> fileConverter =
JavaVersion.JAVA_MAJOR_VERSION >= 9
? Optional.empty()
: Optional.of(PlainVirtualFileConverter.converter());

CompileOptions options =
CompileOptions.of(
fullClasspath.stream()
Expand All @@ -176,7 +171,7 @@ public void compile(
pos -> pos, // sourcePositionMappers
compileOrder, // order
Optional.empty(), // temporaryClassesDirectory
fileConverter, // _converter
Optional.empty(), // _converter
Optional.empty(), // _stamper
Optional.empty() // _earlyOutput
);
Expand Down
19 changes: 0 additions & 19 deletions src/main/java/util/JavaVersion.java

This file was deleted.

0 comments on commit 04445b1

Please sign in to comment.