ForTestCompileStdlib now is invoked in separate process to avoid substituting JarFileSystem and other global components with other incompatible components.
This commit is contained in:
@@ -55,7 +55,7 @@ public class ForTestCompileStdlib {
|
|||||||
finally {
|
finally {
|
||||||
stdlibJar.close();
|
stdlibJar.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
FileUtil.delete(classesDir);
|
FileUtil.delete(classesDir);
|
||||||
return jarFile;
|
return jarFile;
|
||||||
|
|
||||||
@@ -82,7 +82,12 @@ public class ForTestCompileStdlib {
|
|||||||
|
|
||||||
private static void compileKotlinPartOfStdlib(File destdir) throws IOException {
|
private static void compileKotlinPartOfStdlib(File destdir) throws IOException {
|
||||||
// lame
|
// lame
|
||||||
KotlinCompiler.exec("-output", destdir.getPath(), "-src", "./stdlib/ktSrc");
|
Process exec = Runtime.getRuntime().exec(new String[]{System.getProperty("java.home") + "/bin/java", "-cp", System.getProperty("java.class.path"), KotlinCompiler.class.getName(), "-output", destdir.getPath(), "-src", new File("./stdlib/ktSrc").getAbsolutePath()});
|
||||||
|
try {
|
||||||
|
assert exec.waitFor() == 0;
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
throw new AssertionError(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<File> javaFilesInDir(File dir) {
|
private static List<File> javaFilesInDir(File dir) {
|
||||||
|
|||||||
Reference in New Issue
Block a user