Revert "Add option to enable new inference only for IDE analysis"

This reverts commit a3247b1b92.

 #KT-37378 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2020-05-04 14:39:45 +03:00
parent d7dfe9e1e5
commit c01a171d4c
15 changed files with 13 additions and 190 deletions
@@ -58,7 +58,6 @@ import org.jetbrains.kotlin.codegen.AsmUtil
import org.jetbrains.kotlin.codegen.JvmCodegenUtil
import org.jetbrains.kotlin.config.IncrementalCompilation
import org.jetbrains.kotlin.config.KotlinCompilerVersion.TEST_IS_PRE_RELEASE_SYSTEM_PROPERTY
import org.jetbrains.kotlin.config.LanguageVersion
import org.jetbrains.kotlin.incremental.components.LookupTracker
import org.jetbrains.kotlin.incremental.withIC
import org.jetbrains.kotlin.jps.build.KotlinJpsBuildTestBase.LibraryDependency.*
@@ -626,40 +625,6 @@ open class KotlinJpsBuildTest : KotlinJpsBuildTestBase() {
result.assertSuccessful()
}
/*
* Here we're checking that enabling inference in IDE doesn't affect compilation via JPS
*
* the following two tests are connected:
* - testKotlinProjectWithEnabledNewInferenceInIDE checks that project is compiled when new inference is enabled only in IDE
* - this is done via project component
* - testKotlinProjectWithErrorsBecauseOfNewInference checks that project isn't compiled when new inference is enabled in the compiler
*
* So, if the former will fail => option affects JPS compilation, it's bad. Also, if the latter test fails => test is useless as it's
* compiled with new and old inference.
*
*/
fun testKotlinProjectWithEnabledNewInferenceInIDE() {
initProject(JVM_MOCK_RUNTIME)
val module = myProject.modules.single()
val args = module.kotlinCompilerArguments
args.languageVersion = LanguageVersion.KOTLIN_1_3.versionString
myProject.kotlinCommonCompilerArguments = args
buildAllModules().assertSuccessful()
}
fun testKotlinProjectWithErrorsBecauseOfNewInference() {
initProject(JVM_MOCK_RUNTIME)
val module = myProject.modules.single()
val args = module.kotlinCompilerArguments
args.newInference = true
myProject.kotlinCommonCompilerArguments = args
val result = buildAllModules()
result.assertFailed()
result.checkErrors()
}
private fun createKotlinJavaScriptLibraryArchive() {
val jarFile = File(workDir, KOTLIN_JS_LIBRARY_JAR)
try {