diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt index 0ec4343f201..2d3dc330e16 100644 --- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt +++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt @@ -38,6 +38,7 @@ import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment import org.jetbrains.kotlin.cli.jvm.modules.CoreJrtFileSystem import org.jetbrains.kotlin.cli.metadata.K2MetadataCompiler import org.jetbrains.kotlin.config.KotlinCompilerVersion +import org.jetbrains.kotlin.config.LanguageVersion import org.jetbrains.kotlin.config.Services import org.jetbrains.kotlin.daemon.common.* import org.jetbrains.kotlin.daemon.report.CompileServicesFacadeMessageCollector @@ -608,13 +609,17 @@ abstract class CompileServiceImplBase( } val projectRoot = incrementalCompilationOptions.modulesInfo.projectRoot + val useK2 = k2jvmArgs.useK2 || LanguageVersion.fromVersionString(k2jvmArgs.languageVersion)?.usesK2 == true + // TODO: This should be reverted after implementing of fir-based java tracker (KT-57147). + // See org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunnerKt.makeIncrementally + val usePreciseJavaTracking = if (useK2) false else incrementalCompilationOptions.usePreciseJavaTracking val compiler = IncrementalJvmCompilerRunner( workingDir, reporter, buildHistoryFile = incrementalCompilationOptions.multiModuleICSettings.buildHistoryFile, outputDirs = incrementalCompilationOptions.outputFiles, - usePreciseJavaTracking = incrementalCompilationOptions.usePreciseJavaTracking, + usePreciseJavaTracking = usePreciseJavaTracking, modulesApiHistory = modulesApiHistory, kotlinSourceFilesExtensions = allKotlinExtensions, classpathChanges = incrementalCompilationOptions.classpathChanges, diff --git a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunner.kt b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunner.kt index bd39fb168ec..4f4dcc34bf7 100644 --- a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunner.kt +++ b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunner.kt @@ -104,7 +104,7 @@ fun makeIncrementally( cachesDir, buildReporter, // Use precise setting in case of non-Gradle build - usePreciseJavaTracking = !useK2, // TODO: add fir-based java classes tracker when available and set this to true + usePreciseJavaTracking = !useK2, // TODO: add fir-based java classes tracker when available and set this to true (KT-57147) buildHistoryFile = buildHistoryFile, outputDirs = null, modulesApiHistory = EmptyModulesApiHistory, diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirICLightTreeJvmCompilerRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirICLightTreeJvmCompilerRunnerTestGenerated.java index 449398dafee..14f3bcbf750 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirICLightTreeJvmCompilerRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirICLightTreeJvmCompilerRunnerTestGenerated.java @@ -1408,6 +1408,11 @@ public class IncrementalFirICLightTreeJvmCompilerRunnerTestGenerated extends Abs runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/rawErrorTypeDuringSerialization/"); } + @TestMetadata("removeAnnotation") + public void testRemoveAnnotation() throws Exception { + runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation/"); + } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeFieldType") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -1681,6 +1686,19 @@ public class IncrementalFirICLightTreeJvmCompilerRunnerTestGenerated extends Abs } } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RemoveAnnotation extends AbstractIncrementalFirICLightTreeJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInRemoveAnnotation() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM_IR, true); + } + } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirJvmCompilerRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirJvmCompilerRunnerTestGenerated.java index 28752aea41d..4ef7e090306 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirJvmCompilerRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirJvmCompilerRunnerTestGenerated.java @@ -1408,6 +1408,11 @@ public class IncrementalFirJvmCompilerRunnerTestGenerated extends AbstractIncrem runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/rawErrorTypeDuringSerialization/"); } + @TestMetadata("removeAnnotation") + public void testRemoveAnnotation() throws Exception { + runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation/"); + } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeFieldType") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -1681,6 +1686,19 @@ public class IncrementalFirJvmCompilerRunnerTestGenerated extends AbstractIncrem } } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RemoveAnnotation extends AbstractIncrementalFirJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInRemoveAnnotation() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM_IR, true); + } + } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirLightTreeJvmCompilerRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirLightTreeJvmCompilerRunnerTestGenerated.java index 30d8cfe701b..594d55b7790 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirLightTreeJvmCompilerRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalFirLightTreeJvmCompilerRunnerTestGenerated.java @@ -1408,6 +1408,11 @@ public class IncrementalFirLightTreeJvmCompilerRunnerTestGenerated extends Abstr runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/rawErrorTypeDuringSerialization/"); } + @TestMetadata("removeAnnotation") + public void testRemoveAnnotation() throws Exception { + runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation/"); + } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeFieldType") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -1681,6 +1686,19 @@ public class IncrementalFirLightTreeJvmCompilerRunnerTestGenerated extends Abstr } } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RemoveAnnotation extends AbstractIncrementalFirLightTreeJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInRemoveAnnotation() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM_IR, true); + } + } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunnerTestGenerated.java index 6ffe8cec857..a85ca1316cd 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunnerTestGenerated.java @@ -1408,6 +1408,11 @@ public class IncrementalJvmCompilerRunnerTestGenerated extends AbstractIncrement runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/rawErrorTypeDuringSerialization/"); } + @TestMetadata("removeAnnotation") + public void testRemoveAnnotation() throws Exception { + runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation/"); + } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeFieldType") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -1681,6 +1686,19 @@ public class IncrementalJvmCompilerRunnerTestGenerated extends AbstractIncrement } } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RemoveAnnotation extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInRemoveAnnotation() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM_IR, true); + } + } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalJvmJpsTestGenerated.java b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalJvmJpsTestGenerated.java index ad5aabde0b9..dfc5f3e96db 100644 --- a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalJvmJpsTestGenerated.java +++ b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalJvmJpsTestGenerated.java @@ -1576,6 +1576,11 @@ public class IncrementalJvmJpsTestGenerated extends AbstractIncrementalJvmJpsTes runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/rawErrorTypeDuringSerialization/"); } + @TestMetadata("removeAnnotation") + public void testRemoveAnnotation() throws Exception { + runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation/"); + } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeFieldType") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -1849,6 +1854,19 @@ public class IncrementalJvmJpsTestGenerated extends AbstractIncrementalJvmJpsTes } } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RemoveAnnotation extends AbstractIncrementalJvmJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInRemoveAnnotation() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM_IR, true); + } + } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2FirICLightTreeJvmJpsTestGenerated.java b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2FirICLightTreeJvmJpsTestGenerated.java index edaf6171f3a..86f89b7c30a 100644 --- a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2FirICLightTreeJvmJpsTestGenerated.java +++ b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2FirICLightTreeJvmJpsTestGenerated.java @@ -1403,6 +1403,11 @@ public class IncrementalK2FirICLightTreeJvmJpsTestGenerated extends AbstractIncr runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/rawErrorTypeDuringSerialization/"); } + @TestMetadata("removeAnnotation") + public void testRemoveAnnotation() throws Exception { + runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation/"); + } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeFieldType") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -1676,6 +1681,19 @@ public class IncrementalK2FirICLightTreeJvmJpsTestGenerated extends AbstractIncr } } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RemoveAnnotation extends AbstractIncrementalK2FirICLightTreeJvmJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInRemoveAnnotation() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM_IR, true); + } + } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2JvmJpsTestGenerated.java b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2JvmJpsTestGenerated.java index 1112bfd6535..0f67bd5ff78 100644 --- a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2JvmJpsTestGenerated.java +++ b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2JvmJpsTestGenerated.java @@ -1403,6 +1403,11 @@ public class IncrementalK2JvmJpsTestGenerated extends AbstractIncrementalK2JvmJp runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/rawErrorTypeDuringSerialization/"); } + @TestMetadata("removeAnnotation") + public void testRemoveAnnotation() throws Exception { + runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation/"); + } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeFieldType") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -1676,6 +1681,19 @@ public class IncrementalK2JvmJpsTestGenerated extends AbstractIncrementalK2JvmJp } } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RemoveAnnotation extends AbstractIncrementalK2JvmJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInRemoveAnnotation() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM_IR, true); + } + } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2LightTreeJvmJpsTestGenerated.java b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2LightTreeJvmJpsTestGenerated.java index aca982ca100..4ffb9049b8a 100644 --- a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2LightTreeJvmJpsTestGenerated.java +++ b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalK2LightTreeJvmJpsTestGenerated.java @@ -1403,6 +1403,11 @@ public class IncrementalK2LightTreeJvmJpsTestGenerated extends AbstractIncrement runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/rawErrorTypeDuringSerialization/"); } + @TestMetadata("removeAnnotation") + public void testRemoveAnnotation() throws Exception { + runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation/"); + } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeFieldType") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -1676,6 +1681,19 @@ public class IncrementalK2LightTreeJvmJpsTestGenerated extends AbstractIncrement } } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RemoveAnnotation extends AbstractIncrementalK2LightTreeJvmJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInRemoveAnnotation() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM_IR, true); + } + } + @TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation/JavaClass.java b/jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation/JavaClass.java new file mode 100644 index 00000000000..b9ed91652d9 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation/JavaClass.java @@ -0,0 +1,6 @@ +import org.jetbrains.annotations.NotNull; + +public class JavaClass { + // @NotNull + public String value = "value"; +} \ No newline at end of file diff --git a/jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation/JavaClass.java.new.1 b/jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation/JavaClass.java.new.1 new file mode 100644 index 00000000000..e8f98071cfa --- /dev/null +++ b/jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation/JavaClass.java.new.1 @@ -0,0 +1,6 @@ +import org.jetbrains.annotations.NotNull; + +public class JavaClass { + @NotNull + public String value = "value"; +} \ No newline at end of file diff --git a/jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation/Main.kt b/jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation/Main.kt new file mode 100644 index 00000000000..a7952f6f5b6 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation/Main.kt @@ -0,0 +1,4 @@ +fun main() { + val v = JavaClass() + v.value = null //error +} \ No newline at end of file diff --git a/jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation/build.log b/jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation/build.log new file mode 100644 index 00000000000..7d07047db93 --- /dev/null +++ b/jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/removeAnnotation/build.log @@ -0,0 +1,21 @@ +================ Step #1 ================= + +Cleaning output files: + out/production/module/JavaClass.class +End of files +Exit code: NOTHING_DONE +------------------------------------------ +Compiling files: + src/JavaClass.java +End of files +Cleaning output files: + out/production/module/META-INF/module.kotlin_module + out/production/module/MainKt.class +End of files +Compiling files: + src/Main.kt +End of files +Exit code: ABORT +------------------------------------------ +COMPILATION FAILED +Null can not be a value of a non-null type \ No newline at end of file