Always sort files in K2JSCompiler
Previously files were sorted only when IncrementalDataProvider was not null to normalize js output in case of incremental compilation. Because of that an output js file could be different after rebuild in IC tests. The issue could be reproduced anywhere, but the tests failed only on Windows, and it seems tests were not run on Windows for some time.
This commit is contained in:
@@ -146,6 +146,7 @@ public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments> {
|
||||
return translator.translateUnits(reporter, translationUnits, mainCallParameters, jsAnalysisResult);
|
||||
}
|
||||
|
||||
CollectionsKt.sortBy(allKotlinFiles, ktFile -> VfsUtilCore.virtualToIoFile(ktFile.getVirtualFile()));
|
||||
return translator.translate(reporter, allKotlinFiles, mainCallParameters, jsAnalysisResult);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user