Add test for IC issue with typealias
If typealias is defined in a separate file, then after changing some base types, an incremental compilation of Kotlin could not find all affected files, because of lack of information, which it can not get on the class file analyzing phase. FIR provides a new approach to IC compilation: now we can run the frontend several times, which allows us to obtain all necessary information and use it to mark all affected files for recompilation. Relates to KT-54991 #KT-28233 Fixed
This commit is contained in:
committed by
Space Team
parent
25668ddd01
commit
848e1001f8
+5
@@ -82,6 +82,11 @@ public class IncrementalFirICLightTreeJvmCompilerRunnerTestGenerated extends Abs
|
||||
runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/");
|
||||
}
|
||||
|
||||
@TestMetadata("changeTypealiasSinceK2")
|
||||
public void testChangeTypealiasSinceK2() throws Exception {
|
||||
runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeTypealiasSinceK2/");
|
||||
}
|
||||
|
||||
@TestMetadata("changeWithRemovingUsage")
|
||||
public void testChangeWithRemovingUsage() throws Exception {
|
||||
runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/");
|
||||
|
||||
+5
@@ -82,6 +82,11 @@ public class IncrementalFirJvmCompilerRunnerTestGenerated extends AbstractIncrem
|
||||
runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/");
|
||||
}
|
||||
|
||||
@TestMetadata("changeTypealiasSinceK2")
|
||||
public void testChangeTypealiasSinceK2() throws Exception {
|
||||
runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeTypealiasSinceK2/");
|
||||
}
|
||||
|
||||
@TestMetadata("changeWithRemovingUsage")
|
||||
public void testChangeWithRemovingUsage() throws Exception {
|
||||
runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/");
|
||||
|
||||
+5
@@ -82,6 +82,11 @@ public class IncrementalFirLightTreeJvmCompilerRunnerTestGenerated extends Abstr
|
||||
runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/");
|
||||
}
|
||||
|
||||
@TestMetadata("changeTypealiasSinceK2")
|
||||
public void testChangeTypealiasSinceK2() throws Exception {
|
||||
runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeTypealiasSinceK2/");
|
||||
}
|
||||
|
||||
@TestMetadata("changeWithRemovingUsage")
|
||||
public void testChangeWithRemovingUsage() throws Exception {
|
||||
runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/");
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ public class IncrementalJsCompilerRunnerTestGenerated extends AbstractIncrementa
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPureKotlin() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/pureKotlin"), Pattern.compile("^([^\\.]+)$"), null, false);
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/pureKotlin"), Pattern.compile("^([^\\.]+)$"), Pattern.compile(".*SinceK2"), false);
|
||||
}
|
||||
|
||||
@TestMetadata("annotations")
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ public class IncrementalJsCompilerRunnerWithMetadataOnlyTestGenerated extends Ab
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPureKotlin() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/pureKotlin"), Pattern.compile("^([^\\.]+)$"), null, false);
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/pureKotlin"), Pattern.compile("^([^\\.]+)$"), Pattern.compile(".*SinceK2"), false);
|
||||
}
|
||||
|
||||
@TestMetadata("annotations")
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ public class IncrementalJsKlibCompilerRunnerTestGenerated extends AbstractIncrem
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPureKotlin() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/pureKotlin"), Pattern.compile("^([^\\.]+)$"), Pattern.compile("^sealed.*"), false);
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/pureKotlin"), Pattern.compile("^([^\\.]+)$"), Pattern.compile("(^sealed.*)|(.*SinceK2)"), false);
|
||||
}
|
||||
|
||||
@TestMetadata("annotations")
|
||||
|
||||
+5
@@ -81,6 +81,11 @@ public class IncrementalJsKlibCompilerWithScopeExpansionRunnerTestGenerated exte
|
||||
runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/");
|
||||
}
|
||||
|
||||
@TestMetadata("changeTypealiasSinceK2")
|
||||
public void testChangeTypealiasSinceK2() throws Exception {
|
||||
runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeTypealiasSinceK2/");
|
||||
}
|
||||
|
||||
@TestMetadata("changeWithRemovingUsage")
|
||||
public void testChangeWithRemovingUsage() throws Exception {
|
||||
runTest("jps/jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/");
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ public class IncrementalJvmCompilerRunnerTestGenerated extends AbstractIncrement
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPureKotlin() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/pureKotlin"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM_IR, false);
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/pureKotlin"), Pattern.compile("^([^\\.]+)$"), Pattern.compile(".*SinceK2"), TargetBackend.JVM_IR, false);
|
||||
}
|
||||
|
||||
@TestMetadata("annotations")
|
||||
|
||||
Reference in New Issue
Block a user