From c1812d7d92cee583f814209abf7a3b10138a5aa3 Mon Sep 17 00:00:00 2001 From: Alexey Tsvetkov Date: Mon, 28 Nov 2016 15:09:00 +0300 Subject: [PATCH] Move IC tests to compiler Fixing IC after moving it from Gradle to the compiler in commit f40a3eff20f463659be66041d78d255a80d12322 --- .../incremental-compilation-impl.iml | 3 ++ .../IncrementalJvmCompilerRunner.kt | 4 +- .../incremental/snapshots/FileSnapshot.kt | 2 +- .../snapshots/FileSnapshotExternalizer.kt | 2 +- .../incremental/snapshots/FileSnapshotMap.kt | 2 +- .../snapshots/FileSnapshotProvider.kt | 4 +- .../jetbrains/kotlin/TestWithWorkingDir.kt | 38 ++++++++++++++ .../BuildLogParserParametrizedIT.kt | 24 +++++++-- ...linStandaloneIncrementalCompilationTest.kt | 9 ++-- .../snapshots/FileSnapshotMapTest.kt | 0 .../incremental/snapshots/FileSnapshotTest.kt | 0 .../kotlin/incremental/testLogsParsingUtil.kt | 22 ++++++-- .../buildLogsParserData/twoStep/build.log | 50 +++++++++++++++++++ .../buildLogsParserData/twoStep/expected.txt | 16 ++++++ .../buildLogsParserData/withError/build.log | 37 ++++++++++++++ .../withError/expected.txt | 16 ++++++ .../buildLogsParserData/withJava/build.log | 17 +++++++ .../buildLogsParserData/withJava/expected.txt | 7 +++ .../kotlin/jps/BaseIncrementalGradleIT.kt | 4 +- .../jetbrains/kotlin/TestWithWorkingDir.kt | 22 -------- 20 files changed, 235 insertions(+), 44 deletions(-) create mode 100644 compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/TestWithWorkingDir.kt rename {libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle => compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental}/BuildLogParserParametrizedIT.kt (69%) rename {libraries/tools/kotlin-gradle-plugin/src/test/kotlin => compiler/incremental-compilation-impl/test}/org/jetbrains/kotlin/incremental/KotlinStandaloneIncrementalCompilationTest.kt (96%) rename {libraries/tools/kotlin-gradle-plugin/src/test/kotlin => compiler/incremental-compilation-impl/test}/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotMapTest.kt (100%) rename {libraries/tools/kotlin-gradle-plugin/src/test/kotlin => compiler/incremental-compilation-impl/test}/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotTest.kt (100%) rename {libraries/tools/kotlin-gradle-plugin/src/test/kotlin => compiler/incremental-compilation-impl/test}/org/jetbrains/kotlin/incremental/testLogsParsingUtil.kt (81%) create mode 100644 compiler/incremental-compilation-impl/testData/buildLogsParserData/twoStep/build.log create mode 100644 compiler/incremental-compilation-impl/testData/buildLogsParserData/twoStep/expected.txt create mode 100644 compiler/incremental-compilation-impl/testData/buildLogsParserData/withError/build.log create mode 100644 compiler/incremental-compilation-impl/testData/buildLogsParserData/withError/expected.txt create mode 100644 compiler/incremental-compilation-impl/testData/buildLogsParserData/withJava/build.log create mode 100644 compiler/incremental-compilation-impl/testData/buildLogsParserData/withJava/expected.txt delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/TestWithWorkingDir.kt diff --git a/compiler/incremental-compilation-impl/incremental-compilation-impl.iml b/compiler/incremental-compilation-impl/incremental-compilation-impl.iml index 25e72dc7e11..82211801d79 100644 --- a/compiler/incremental-compilation-impl/incremental-compilation-impl.iml +++ b/compiler/incremental-compilation-impl/incremental-compilation-impl.iml @@ -4,6 +4,8 @@ + + @@ -15,5 +17,6 @@ + \ No newline at end of file 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 9a909cfd029..37b8b128a8a 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 @@ -499,10 +499,10 @@ class IncrementalJvmCompilerRunner( } } -internal var K2JVMCompilerArguments.destinationAsFile: File +var K2JVMCompilerArguments.destinationAsFile: File get() = File(destination) set(value) { destination = value.path } -internal var K2JVMCompilerArguments.classpathAsList: List +var K2JVMCompilerArguments.classpathAsList: List get() = classpath.split(File.pathSeparator).map(::File) set(value) { classpath = value.joinToString(separator = File.pathSeparator, transform = { it.path }) } \ No newline at end of file diff --git a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/snapshots/FileSnapshot.kt b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/snapshots/FileSnapshot.kt index 4a104c9ff74..3096553badc 100644 --- a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/snapshots/FileSnapshot.kt +++ b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/snapshots/FileSnapshot.kt @@ -19,7 +19,7 @@ package org.jetbrains.kotlin.incremental.snapshots import java.io.File import java.util.* -internal class FileSnapshot( +class FileSnapshot( val file: File, val length: Long, val hash: ByteArray diff --git a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotExternalizer.kt b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotExternalizer.kt index 0c3e8fcc828..61c398e6f08 100644 --- a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotExternalizer.kt +++ b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotExternalizer.kt @@ -21,7 +21,7 @@ import java.io.DataInput import java.io.DataOutput import java.io.File -internal object FileSnapshotExternalizer : DataExternalizer { +object FileSnapshotExternalizer : DataExternalizer { override fun save(out: DataOutput, value: FileSnapshot) { out.writeUTF(value.file.canonicalPath) out.writeLong(value.length) diff --git a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotMap.kt b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotMap.kt index 50f3f23c127..ba6e1ac8166 100644 --- a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotMap.kt +++ b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotMap.kt @@ -22,7 +22,7 @@ import org.jetbrains.kotlin.incremental.storage.PathStringDescriptor import java.io.File import java.util.* -internal class FileSnapshotMap(storageFile: File) : BasicStringMap(storageFile, PathStringDescriptor, FileSnapshotExternalizer) { +class FileSnapshotMap(storageFile: File) : BasicStringMap(storageFile, PathStringDescriptor, FileSnapshotExternalizer) { override fun dumpValue(value: FileSnapshot): String = value.toString() diff --git a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotProvider.kt b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotProvider.kt index 20aa79f480f..1e71a9c2627 100644 --- a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotProvider.kt +++ b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotProvider.kt @@ -18,11 +18,11 @@ package org.jetbrains.kotlin.incremental.snapshots import java.io.File -internal interface FileSnapshotProvider { +interface FileSnapshotProvider { operator fun get(file: File): FileSnapshot } -internal class SimpleFileSnapshotProviderImpl : FileSnapshotProvider { +class SimpleFileSnapshotProviderImpl : FileSnapshotProvider { override fun get(file: File): FileSnapshot { val length = file.length() val hash = file.md5 diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/TestWithWorkingDir.kt b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/TestWithWorkingDir.kt new file mode 100644 index 00000000000..c4cb7bafdd8 --- /dev/null +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/TestWithWorkingDir.kt @@ -0,0 +1,38 @@ +/* + * Copyright 2010-2016 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.kotlin + +import com.intellij.openapi.util.io.FileUtil +import org.junit.After +import org.junit.Before +import java.io.File +import kotlin.properties.Delegates + +abstract class TestWithWorkingDir { + protected var workingDir: File by Delegates.notNull() + private set + + @Before + open fun setUp() { + workingDir = FileUtil.createTempDirectory(this.javaClass.simpleName, null) + } + + @After + open fun tearDown() { + workingDir.deleteRecursively() + } +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/BuildLogParserParametrizedIT.kt b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/BuildLogParserParametrizedIT.kt similarity index 69% rename from libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/BuildLogParserParametrizedIT.kt rename to compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/BuildLogParserParametrizedIT.kt index dcf171218d2..76abee202dc 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/BuildLogParserParametrizedIT.kt +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/BuildLogParserParametrizedIT.kt @@ -1,7 +1,21 @@ -package org.jetbrains.kotlin.gradle +/* + * Copyright 2010-2016 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.kotlin.incremental -import org.jetbrains.kotlin.gradle.incremental.dumpBuildLog -import org.jetbrains.kotlin.gradle.incremental.parseTestBuildLog import org.junit.Assert import org.junit.Test import org.junit.runner.RunWith @@ -9,7 +23,7 @@ import org.junit.runners.Parameterized import java.io.File @RunWith(Parameterized::class) -class BuildLogParserParametrizedIT : BaseGradleIT() { +class BuildLogParserParametrizedTest { @Parameterized.Parameter @JvmField @@ -40,7 +54,7 @@ class BuildLogParserParametrizedIT : BaseGradleIT() { } companion object { - private val TEST_ROOT = File(resourcesRootFile, "buildLogsParserData") + private val TEST_ROOT = File("compiler/incremental-compilation-impl/testData/buildLogsParserData") private val LOG_FILE_NAME = "build.log" private val EXPECTED_PARSED_LOG_FILE_NAME = "expected.txt" diff --git a/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/incremental/KotlinStandaloneIncrementalCompilationTest.kt b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/KotlinStandaloneIncrementalCompilationTest.kt similarity index 96% rename from libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/incremental/KotlinStandaloneIncrementalCompilationTest.kt rename to compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/KotlinStandaloneIncrementalCompilationTest.kt index cdb16a1d42f..747ae2e24b1 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/incremental/KotlinStandaloneIncrementalCompilationTest.kt +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/KotlinStandaloneIncrementalCompilationTest.kt @@ -22,15 +22,14 @@ import org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments import org.jetbrains.kotlin.cli.common.messages.CompilerMessageLocation import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity import org.jetbrains.kotlin.cli.common.messages.MessageCollector -import org.jetbrains.kotlin.com.intellij.util.containers.HashMap -import org.jetbrains.kotlin.gradle.incremental.parseTestBuildLog +import com.intellij.util.containers.HashMap +import org.junit.Assert.assertEquals import org.jetbrains.kotlin.incremental.testingUtils.* import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized import java.io.File import java.util.* -import kotlin.test.assertEquals @RunWith(Parameterized::class) class KotlinStandaloneIncrementalCompilationTest : TestWithWorkingDir() { @@ -104,7 +103,7 @@ class KotlinStandaloneIncrementalCompilationTest : TestWithWorkingDir() { val rebuildExpectedToSucceed = buildLogSteps.last().compileSucceeded val rebuildSucceeded = rebuildResult.exitCode == ExitCode.OK - assertEquals(rebuildExpectedToSucceed, rebuildSucceeded, "Rebuild exit code differs from incremental exit code") + assertEquals("Rebuild exit code differs from incremental exit code", rebuildExpectedToSucceed, rebuildSucceeded) if (rebuildSucceeded) { assertEqualDirectories(outDir, rebuildOutDir, forgiveExtraFiles = rebuildSucceeded) @@ -185,7 +184,7 @@ class KotlinStandaloneIncrementalCompilationTest : TestWithWorkingDir() { } companion object { - private val jpsResourcesPath = File("../../../jps-plugin/testData/incremental") + private val jpsResourcesPath = File("jps-plugin/testData/incremental") private val ignoredDirs = setOf(File(jpsResourcesPath, "cacheVersionChanged"), File(jpsResourcesPath, "changeIncrementalOption"), File(jpsResourcesPath, "custom"), diff --git a/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotMapTest.kt b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotMapTest.kt similarity index 100% rename from libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotMapTest.kt rename to compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotMapTest.kt diff --git a/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotTest.kt b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotTest.kt similarity index 100% rename from libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotTest.kt rename to compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/snapshots/FileSnapshotTest.kt diff --git a/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/incremental/testLogsParsingUtil.kt b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/testLogsParsingUtil.kt similarity index 81% rename from libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/incremental/testLogsParsingUtil.kt rename to compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/testLogsParsingUtil.kt index 9c00cd34ef4..d65d331653f 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/incremental/testLogsParsingUtil.kt +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/testLogsParsingUtil.kt @@ -1,6 +1,22 @@ -package org.jetbrains.kotlin.gradle.incremental +/* + * Copyright 2010-2016 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ -import org.jetbrains.kotlin.com.intellij.openapi.util.io.FileUtil +package org.jetbrains.kotlin.incremental + +import com.intellij.openapi.util.io.FileUtil import java.io.File private const val BEGIN_COMPILED_FILES = "Compiling files:" @@ -83,7 +99,7 @@ fun parseTestBuildLog(file: File): List { } } -// used in integration tests +// used in gradle integration tests @Suppress("unused") fun dumpBuildLog(buildSteps: Iterable): String { val sb = StringBuilder() diff --git a/compiler/incremental-compilation-impl/testData/buildLogsParserData/twoStep/build.log b/compiler/incremental-compilation-impl/testData/buildLogsParserData/twoStep/build.log new file mode 100644 index 00000000000..1b9129d947f --- /dev/null +++ b/compiler/incremental-compilation-impl/testData/buildLogsParserData/twoStep/build.log @@ -0,0 +1,50 @@ +================ Step #1 ================= + +Cleaning output files: + out/production/module/META-INF/module.kotlin_module + out/production/module/inline/InlineGetKt.class +End of files +Compiling files: + src/inlineGet.kt +End of files +Marked as dirty by Kotlin: + src/UsageVal.kt + src/UsageVar.kt +Exit code: ADDITIONAL_PASS_REQUIRED +------------------------------------------ +Cleaning output files: + out/production/module/usage/UsageVal.class + out/production/module/usage/UsageVar.class +End of files +Compiling files: + src/UsageVal.kt + src/UsageVar.kt +End of files +Exit code: ADDITIONAL_PASS_REQUIRED +------------------------------------------ +Exit code: NOTHING_DONE +------------------------------------------ + +================ Step #2 ================= + +Cleaning output files: + out/production/module/META-INF/module.kotlin_module + out/production/module/inline/InlineSetKt.class +End of files +Compiling files: + src/inlineSet.kt +End of files +Marked as dirty by Kotlin: + src/UsageVar.kt +Exit code: ADDITIONAL_PASS_REQUIRED +------------------------------------------ +Cleaning output files: + out/production/module/usage/UsageVar.class +End of files +Compiling files: + src/UsageVar.kt +End of files +Exit code: ADDITIONAL_PASS_REQUIRED +------------------------------------------ +Exit code: NOTHING_DONE +------------------------------------------ \ No newline at end of file diff --git a/compiler/incremental-compilation-impl/testData/buildLogsParserData/twoStep/expected.txt b/compiler/incremental-compilation-impl/testData/buildLogsParserData/twoStep/expected.txt new file mode 100644 index 00000000000..20f1cccec5a --- /dev/null +++ b/compiler/incremental-compilation-impl/testData/buildLogsParserData/twoStep/expected.txt @@ -0,0 +1,16 @@ +================ Step #1 ================= + +Compiling files: +src/UsageVal.kt +src/UsageVar.kt +src/inlineGet.kt +End of files +------------------------------------------ + +================ Step #2 ================= + +Compiling files: +src/UsageVar.kt +src/inlineSet.kt +End of files +------------------------------------------ diff --git a/compiler/incremental-compilation-impl/testData/buildLogsParserData/withError/build.log b/compiler/incremental-compilation-impl/testData/buildLogsParserData/withError/build.log new file mode 100644 index 00000000000..b622c7a883a --- /dev/null +++ b/compiler/incremental-compilation-impl/testData/buildLogsParserData/withError/build.log @@ -0,0 +1,37 @@ +================ Step #1 ================= + +Cleaning output files: + out/production/module1/META-INF/module1.kotlin_module + out/production/module1/a/A.class + out/production/module1/a/ClassAnnotation.class + out/production/module1/a/FileAnnotation.class + out/production/module1/a/Module1_aKt.class +End of files +Compiling files: + module1/src/module1_a.kt +End of files +Marked as dirty by Kotlin: + module2/src/module2_b.kt +Exit code: ADDITIONAL_PASS_REQUIRED +------------------------------------------ +Exit code: NOTHING_DONE +------------------------------------------ +Cleaning output files: + out/production/module2/META-INF/module2.kotlin_module + out/production/module2/b/B.class + out/production/module2/b/Module2_bKt.class +End of files +Compiling files: + module2/src/module2_b.kt +End of files +Exit code: ABORT +------------------------------------------ +COMPILATION FAILED +Cannot access 'FileAnnotation': it is internal in 'a' +Cannot access 'A': it is internal in 'a' +Cannot access 'FileAnnotation': it is internal in 'a' +Cannot access 'ClassAnnotation': it is internal in 'a' +Cannot access 'ClassAnnotation': it is internal in 'a' +Function effective visibility 'public' should be the same or less permissive than its parameter type effective visibility 'internal' +Cannot access 'A': it is internal in 'a' +Cannot access 'a': it is internal in 'a' diff --git a/compiler/incremental-compilation-impl/testData/buildLogsParserData/withError/expected.txt b/compiler/incremental-compilation-impl/testData/buildLogsParserData/withError/expected.txt new file mode 100644 index 00000000000..f1745b9b41d --- /dev/null +++ b/compiler/incremental-compilation-impl/testData/buildLogsParserData/withError/expected.txt @@ -0,0 +1,16 @@ +================ Step #1 ================= + +Compiling files: +module1/src/module1_a.kt +module2/src/module2_b.kt +End of files +------------------------------------------ +COMPILATION FAILED +Cannot access 'FileAnnotation': it is internal in 'a' +Cannot access 'A': it is internal in 'a' +Cannot access 'FileAnnotation': it is internal in 'a' +Cannot access 'ClassAnnotation': it is internal in 'a' +Cannot access 'ClassAnnotation': it is internal in 'a' +Function effective visibility 'public' should be the same or less permissive than its parameter type effective visibility 'internal' +Cannot access 'A': it is internal in 'a' +Cannot access 'a': it is internal in 'a' diff --git a/compiler/incremental-compilation-impl/testData/buildLogsParserData/withJava/build.log b/compiler/incremental-compilation-impl/testData/buildLogsParserData/withJava/build.log new file mode 100644 index 00000000000..77974661009 --- /dev/null +++ b/compiler/incremental-compilation-impl/testData/buildLogsParserData/withJava/build.log @@ -0,0 +1,17 @@ +================ Step #1 ================= + +Cleaning output files: + out/production/module/JavaClass.class + out/production/module/META-INF/module.kotlin_module + out/production/module/UsageKt.class +End of files +Compiling files: + src/usage.kt +End of files +Exit code: ADDITIONAL_PASS_REQUIRED +------------------------------------------ +Compiling files: + src/JavaClass.java +End of files +Exit code: NOTHING_DONE +------------------------------------------ diff --git a/compiler/incremental-compilation-impl/testData/buildLogsParserData/withJava/expected.txt b/compiler/incremental-compilation-impl/testData/buildLogsParserData/withJava/expected.txt new file mode 100644 index 00000000000..84895c41f6f --- /dev/null +++ b/compiler/incremental-compilation-impl/testData/buildLogsParserData/withJava/expected.txt @@ -0,0 +1,7 @@ +================ Step #1 ================= + +Compiling files: +src/usage.kt +src/JavaClass.java +End of files +------------------------------------------ diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/jps/BaseIncrementalGradleIT.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/jps/BaseIncrementalGradleIT.kt index 49059be2988..757a2f60313 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/jps/BaseIncrementalGradleIT.kt +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/jps/BaseIncrementalGradleIT.kt @@ -2,8 +2,8 @@ package org.jetbrains.kotlin.jps import org.gradle.api.logging.LogLevel import org.jetbrains.kotlin.gradle.BaseGradleIT -import org.jetbrains.kotlin.gradle.incremental.BuildStep -import org.jetbrains.kotlin.gradle.incremental.parseTestBuildLog +import org.jetbrains.kotlin.incremental.BuildStep +import org.jetbrains.kotlin.incremental.parseTestBuildLog import org.jetbrains.kotlin.incremental.testingUtils.* import org.junit.Assume import java.io.File diff --git a/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/TestWithWorkingDir.kt b/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/TestWithWorkingDir.kt deleted file mode 100644 index 4574e560757..00000000000 --- a/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/TestWithWorkingDir.kt +++ /dev/null @@ -1,22 +0,0 @@ -package org.jetbrains.kotlin - -import org.jetbrains.kotlin.com.intellij.openapi.util.io.FileUtil -import org.junit.After -import org.junit.Before -import java.io.File -import kotlin.properties.Delegates - -abstract class TestWithWorkingDir { - protected var workingDir: File by Delegates.notNull() - private set - - @Before - open fun setUp() { - workingDir = FileUtil.createTempDirectory(this.javaClass.simpleName, null) - } - - @After - open fun tearDown() { - workingDir.deleteRecursively() - } -} \ No newline at end of file