Isolate JS compiler in proto tests

Proto tests are still in the 'jps-tests' module
which is included in non-compiler tests.

It is not safe to call the compiler
directly in non-compiler tests
because it might affect IDE tests.
This commit is contained in:
Alexey Tsvetkov
2017-07-31 22:01:31 +03:00
parent ed5b6e07aa
commit 1cce1ef1f6
4 changed files with 68 additions and 15 deletions
@@ -81,6 +81,19 @@ class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR) {
const val JVM_BUILD_META_INFO_FILE_NAME = "jvm-build-meta-info.txt"
const val SKIP_CACHE_VERSION_CHECK_PROPERTY = "kotlin.jps.skip.cache.version.check"
const val JPS_KOTLIN_HOME_PROPERTY = "jps.kotlin.home"
val classesToLoadByParent: ClassCondition
get() = ClassCondition { className ->
className.startsWith("org.jetbrains.kotlin.load.kotlin.incremental.components.")
|| className.startsWith("org.jetbrains.kotlin.incremental.components.")
|| className.startsWith("org.jetbrains.kotlin.incremental.js")
|| className == "org.jetbrains.kotlin.config.Services"
|| className.startsWith("org.apache.log4j.") // For logging from compiler
|| className == "org.jetbrains.kotlin.progress.CompilationCanceledStatus"
|| className == "org.jetbrains.kotlin.progress.CompilationCanceledException"
|| className == "org.jetbrains.kotlin.modules.TargetId"
|| className == "org.jetbrains.kotlin.cli.common.ExitCode"
}
}
private val statisticsLogger = TeamcityStatisticsLogger()
@@ -467,15 +480,7 @@ class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR) {
return JpsCompilerEnvironment(
paths,
compilerServices,
ClassCondition { className ->
className.startsWith("org.jetbrains.kotlin.load.kotlin.incremental.components.")
|| className.startsWith("org.jetbrains.kotlin.incremental.components.")
|| className == "org.jetbrains.kotlin.config.Services"
|| className.startsWith("org.apache.log4j.") // For logging from compiler
|| className == "org.jetbrains.kotlin.progress.CompilationCanceledStatus"
|| className == "org.jetbrains.kotlin.progress.CompilationCanceledException"
|| className == "org.jetbrains.kotlin.modules.TargetId"
},
classesToLoadByParent,
messageCollector,
OutputItemsCollectorImpl()
)