Incremental: fixed adding file to package and using it from Java
This commit is contained in:
+4
-1
@@ -67,7 +67,10 @@ public class IncrementalPackageFragmentProvider(
|
||||
fqNameToPackageFragment[fqName] = IncrementalPackageFragment(fqName)
|
||||
}
|
||||
|
||||
fqNamesToLoad = obsoletePackageParts.map { JvmClassName.byInternalName(it).getPackageFqName() }.toSet()
|
||||
fqNamesToLoad = (
|
||||
obsoletePackageParts.map { JvmClassName.byInternalName(it).getPackageFqName() }
|
||||
+ PackagePartClassUtils.getPackageFilesWithCallables(sourceFiles).map { it.getPackageFqName() }
|
||||
).toSet()
|
||||
|
||||
fqNamesToLoad.forEach { createPackageFragment(it) }
|
||||
}
|
||||
|
||||
@@ -628,6 +628,12 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("packageFileAdded")
|
||||
public void testPackageFileAdded() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/packageFileAdded/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("propertyRenamed")
|
||||
public void testPropertyRenamed() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/propertyRenamed/");
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
class Usage {
|
||||
void usage() {
|
||||
test.TestPackage.a();
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
class Usage {
|
||||
void usage() {
|
||||
test.TestPackage.a();
|
||||
test.TestPackage.b();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package test
|
||||
|
||||
fun a() {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package test
|
||||
|
||||
fun b() {
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
Cleaning output files:
|
||||
out/production/module/Usage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/b.kt
|
||||
End of files
|
||||
Compiling files:
|
||||
src/Usage.java
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/Usage.class
|
||||
out/production/module/test/TestPackage$a$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/a.kt
|
||||
End of files
|
||||
Compiling files:
|
||||
src/Usage.java
|
||||
End of files
|
||||
Reference in New Issue
Block a user