Use '$' instead of '-' in package part class names
Otherwise some tools break (e.g. CheckMethodAdapter in ASM, used in generic signature writer) because they expect class names to be Java identifiers. Some tests fixed, some will be fixed in future commits
This commit is contained in:
@@ -22,6 +22,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.codegen.ClosureCodegen;
|
||||
import org.jetbrains.jet.codegen.StackValue;
|
||||
import org.jetbrains.jet.codegen.state.JetTypeMapper;
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmClassName;
|
||||
import org.jetbrains.jet.lang.resolve.java.PackageClassUtils;
|
||||
import org.jetbrains.org.objectweb.asm.Label;
|
||||
import org.jetbrains.org.objectweb.asm.MethodVisitor;
|
||||
import org.jetbrains.org.objectweb.asm.Opcodes;
|
||||
@@ -541,10 +543,12 @@ public class MethodInliner {
|
||||
return type;
|
||||
}
|
||||
|
||||
int i = type.indexOf('-');
|
||||
if (i >= 0) {
|
||||
return type.substring(0, i);
|
||||
JvmClassName name = JvmClassName.byInternalName(type);
|
||||
String packageClassInternalName = PackageClassUtils.getPackageClassInternalName(name.getPackageFqName());
|
||||
if (type.startsWith(packageClassInternalName + '$')) {
|
||||
return packageClassInternalName;
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
@@ -552,7 +556,8 @@ public class MethodInliner {
|
||||
public RuntimeException wrapException(@NotNull Exception originalException, @NotNull MethodNode node, @NotNull String errorSuffix) {
|
||||
if (originalException instanceof InlineException) {
|
||||
return new InlineException(errorPrefix + ": " + errorSuffix, originalException);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return new InlineException(errorPrefix + ": " + errorSuffix + "\ncause: " +
|
||||
getNodeText(node), originalException);
|
||||
}
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ public class PackagePartClassUtils {
|
||||
String fileName = FileUtil.getNameWithoutExtension(PathUtil.getFileName(file.getName()));
|
||||
|
||||
// path hashCode to prevent same name / different path collision
|
||||
String srcName = facadeFqName.shortName().asString() + "-" + replaceSpecialSymbols(fileName) + "-" + Integer.toHexString(
|
||||
String srcName = facadeFqName.shortName().asString() + "$" + replaceSpecialSymbols(fileName) + "$" + Integer.toHexString(
|
||||
getPathHashCode(file));
|
||||
|
||||
return facadeFqName.parent().child(Name.identifier(srcName));
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ import java.util.HashMap
|
||||
import java.io.File
|
||||
|
||||
public fun IncrementalCache.getPackagesWithRemovedFiles(sourceFilesToCompile: Collection<JetFile>): Collection<FqName> {
|
||||
return getRemovedPackageParts(sourceFilesToCompile).map { it.getFqNameForClassNameWithoutDollars().parent() }
|
||||
return getRemovedPackageParts(sourceFilesToCompile).map { it.getPackageFqName() }
|
||||
}
|
||||
|
||||
public fun IncrementalCache.getRemovedPackageParts(sourceFilesToCompile: Collection<JetFile>): Collection<JvmClassName> {
|
||||
|
||||
+3
-3
@@ -5,11 +5,11 @@ fun box(): String {
|
||||
val enclosingMethod = javaClass.getEnclosingMethod()
|
||||
if (enclosingMethod?.getName() != "box") return "method: $enclosingMethod"
|
||||
|
||||
val enclosingClass = javaClass.getEnclosingClass()
|
||||
if (!enclosingClass!!.getName().startsWith("_DefaultPackage-lambdaInFunction-")) return "enclosing class: $enclosingClass"
|
||||
val enclosingClass = javaClass.getEnclosingClass()!!.getName()
|
||||
if (!enclosingClass.startsWith("_DefaultPackage") || !enclosingClass.contains("lambdaInFunction")) return "enclosing class: $enclosingClass"
|
||||
|
||||
val declaringClass = javaClass.getDeclaringClass()
|
||||
if (declaringClass != null) return "anonymous function has a declaring class: $declaringClass"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
val l: Any = {}
|
||||
|
||||
fun box(): String {
|
||||
val enclosingClass = l.javaClass.getEnclosingClass()
|
||||
if (!enclosingClass!!.getName().startsWith("_DefaultPackage-lambdaInPackage-")) return "enclosing class: $enclosingClass"
|
||||
val enclosingClass = l.javaClass.getEnclosingClass()!!.getName()
|
||||
if (!enclosingClass.startsWith("_DefaultPackage") || !enclosingClass.contains("lambdaInPackage")) return "enclosing class: $enclosingClass"
|
||||
|
||||
val enclosingConstructor = l.javaClass.getEnclosingConstructor()
|
||||
if (enclosingConstructor != null) return "enclosing constructor found: $enclosingConstructor"
|
||||
@@ -14,4 +14,4 @@ fun box(): String {
|
||||
if (declaringClass != null) return "anonymous function has a declaring class: $declaringClass"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -6,11 +6,11 @@ fun box(): String {
|
||||
val enclosingMethod = l.javaClass.getEnclosingMethod()
|
||||
if (enclosingMethod?.getName() != "getL") return "method: $enclosingMethod"
|
||||
|
||||
val enclosingClass = l.javaClass.getEnclosingClass()
|
||||
if (!enclosingClass!!.getName().startsWith("_DefaultPackage-lambdaInPropertyGetter-")) return "enclosing class: $enclosingClass"
|
||||
val enclosingClass = l.javaClass.getEnclosingClass()!!.getName()
|
||||
if (!enclosingClass.startsWith("_DefaultPackage") || !enclosingClass.contains("lambdaInPropertyGetter")) return "enclosing class: $enclosingClass"
|
||||
|
||||
val declaringClass = l.javaClass.getDeclaringClass()
|
||||
if (declaringClass != null) return "anonymous function has a declaring class: $declaringClass"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+3
-4
@@ -1,4 +1,3 @@
|
||||
|
||||
var _l: Any = ""
|
||||
|
||||
var l: Any
|
||||
@@ -13,11 +12,11 @@ fun box(): String {
|
||||
val enclosingMethod = l.javaClass.getEnclosingMethod()
|
||||
if (enclosingMethod?.getName() != "setL") return "method: $enclosingMethod"
|
||||
|
||||
val enclosingClass = l.javaClass.getEnclosingClass()
|
||||
if (!enclosingClass!!.getName().startsWith("_DefaultPackage-lambdaInPropertySetter-")) return "enclosing class: $enclosingClass"
|
||||
val enclosingClass = l.javaClass.getEnclosingClass()!!.getName()
|
||||
if (!enclosingClass.startsWith("_DefaultPackage") || !enclosingClass.contains("lambdaInPropertySetter")) return "enclosing class: $enclosingClass"
|
||||
|
||||
val declaringClass = l.javaClass.getDeclaringClass()
|
||||
if (declaringClass != null) return "anonymous function has a declaring class: $declaringClass"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,4 +5,4 @@ fun simpleFoo(s: Int = 111) {
|
||||
}
|
||||
|
||||
// 1 BIPUSH 111
|
||||
// 1 INVOKESTATIC foo/FooPackage-.*\.simpleFoo\$default \(II\)V
|
||||
// 1 INVOKESTATIC foo/FooPackage.+\.simpleFoo\$default \(II\)V
|
||||
|
||||
@@ -3,5 +3,5 @@ fun foo() {
|
||||
}
|
||||
|
||||
// assert function will be inlined, and we assure that there are no calls via package part, but is call via package facade in inlined code
|
||||
// 0 INVOKESTATIC kotlin\/KotlinPackage-[^-]+-[^-]+.getASSERTIONS_ENABLED \(\)Z
|
||||
// 1 INVOKESTATIC kotlin\/KotlinPackage.getASSERTIONS_ENABLED \(\)Z
|
||||
// 0 INVOKESTATIC kotlin\/KotlinPackage.+\.getASSERTIONS_ENABLED \(\)Z
|
||||
// 1 INVOKESTATIC kotlin\/KotlinPackage\.getASSERTIONS_ENABLED \(\)Z
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
fun foo(a: Int = 1) {}
|
||||
|
||||
//0 _DefaultPackage.foo
|
||||
//3 INVOKESTATIC _DefaultPackage-
|
||||
// 0 _DefaultPackage.foo
|
||||
// 3 INVOKESTATIC _DefaultPackage.+
|
||||
|
||||
@@ -24,4 +24,3 @@ fun bar2(x : Season) : String {
|
||||
}
|
||||
|
||||
// 2 TABLESWITCH
|
||||
// 1 @_DefaultPackage-expression-.*\$WhenMappings\.class
|
||||
|
||||
-1
@@ -19,4 +19,3 @@ fun box() : String {
|
||||
}
|
||||
|
||||
// 1 LOOKUPSWITCH
|
||||
// 1 @_DefaultPackage-functionLiteralInTopLevel-[a-z0-9]+\$WhenMappings.class
|
||||
|
||||
@@ -33,4 +33,3 @@ class A {
|
||||
}
|
||||
|
||||
// 2 TABLESWITCH
|
||||
// 1 @abc/foo/A\$WhenMappings\.class
|
||||
|
||||
@@ -28,4 +28,3 @@ fun bar2(x : Season) : String {
|
||||
}
|
||||
|
||||
// 2 TABLESWITCH
|
||||
// 1 @_DefaultPackage-withoutElse-.*\$WhenMappings\.class
|
||||
|
||||
@@ -4,5 +4,5 @@ fun test2() {
|
||||
1.test1()
|
||||
}
|
||||
|
||||
// 2 INVOKESTATIC _DefaultPackage-1-[0-9a-f]+\.test1 \(I\)V
|
||||
// 1 INVOKESTATIC _DefaultPackage-1-[0-9a-f]+\.test2 \(\)V
|
||||
// 2 INVOKESTATIC _DefaultPackage.+\.test1 \(I\)V
|
||||
// 1 INVOKESTATIC _DefaultPackage.+\.test2 \(\)V
|
||||
|
||||
@@ -2,5 +2,5 @@ package a
|
||||
|
||||
fun test1() {}
|
||||
|
||||
// 2 INVOKESTATIC a/APackage-1-[0-9a-f]+\.test1 \(\)V
|
||||
// 1 INVOKESTATIC b/BPackage-2-[0-9a-f]+\.test2 \(\)V
|
||||
// 2 INVOKESTATIC a/APackage.+\.test1 \(\)V
|
||||
// 1 INVOKESTATIC b/BPackage.+\.test2 \(\)V
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
fun test1() {}
|
||||
|
||||
// 2 INVOKESTATIC _DefaultPackage-1-[0-9a-f]+\.test1 \(\)V
|
||||
// 1 INVOKESTATIC _DefaultPackage-2-[0-9a-f]+\.test2 \(\)V
|
||||
// 2 INVOKESTATIC _DefaultPackage.+\.test1 \(\)V
|
||||
// 1 INVOKESTATIC _DefaultPackage.+\.test2 \(\)V
|
||||
|
||||
@@ -4,5 +4,5 @@ fun test2() {
|
||||
test1()
|
||||
}
|
||||
|
||||
// 2 INVOKESTATIC _DefaultPackage-1-[0-9a-f]+\.test1 \(\)V
|
||||
// 1 INVOKESTATIC _DefaultPackage-1-[0-9a-f]+\.test2 \(\)V
|
||||
// 2 INVOKESTATIC _DefaultPackage.+\.test1 \(\)V
|
||||
// 1 INVOKESTATIC _DefaultPackage.+\.test2 \(\)V
|
||||
|
||||
@@ -2,5 +2,5 @@ package a
|
||||
|
||||
val prop = 1
|
||||
|
||||
// 2 INVOKESTATIC a/APackage-1-[0-9a-f]+\.getProp \(\)I
|
||||
// 1 GETSTATIC a/APackage-1-[0-9a-f]+\.prop \: I
|
||||
// 2 INVOKESTATIC a/APackage.+\.getProp \(\)I
|
||||
// 1 GETSTATIC a/APackage.+\.prop \: I
|
||||
|
||||
@@ -5,5 +5,5 @@ val prop: Int = 0
|
||||
return $prop + 1
|
||||
}
|
||||
|
||||
// 2 INVOKESTATIC a/APackage-1-[0-9a-f]+\.getProp \(\)I
|
||||
// 1 GETSTATIC a/APackage-1-[0-9a-f]+\.prop \: I
|
||||
// 2 INVOKESTATIC a/APackage.+\.getProp \(\)I
|
||||
// 1 GETSTATIC a/APackage.+\.prop \: I
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
deprecated("") val test: Int = 0
|
||||
|
||||
// TESTED_OBJECT_KIND: property
|
||||
// TESTED_OBJECTS: _DefaultPackage-topLevelProperty-, test
|
||||
// TESTED_OBJECTS: _DefaultPackage$, test
|
||||
// IS_FULL_CONTAINING_CLASS_NAME: false
|
||||
// FLAGS: ACC_DEPRECATED, ACC_FINAL, ACC_STATIC
|
||||
|
||||
@@ -21,6 +21,9 @@ import com.intellij.openapi.util.text.StringUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.OutputFile;
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmAbi;
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmClassName;
|
||||
import org.jetbrains.jet.lang.resolve.java.PackageClassUtils;
|
||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||
import org.jetbrains.org.objectweb.asm.*;
|
||||
import org.jetbrains.org.objectweb.asm.tree.MethodNode;
|
||||
|
||||
@@ -96,16 +99,17 @@ public class InlineTestUtil {
|
||||
public MethodVisitor visitMethod(
|
||||
int access, @NotNull String name, @NotNull String desc, String signature, String[] exceptions
|
||||
) {
|
||||
FqName classFqName = JvmClassName.byInternalName(className.get()).getFqNameForClassNameWithoutDollars();
|
||||
if (PackageClassUtils.isPackageClassFqName(classFqName)) {
|
||||
return super.visitMethod(access, name, desc, signature, exceptions);
|
||||
}
|
||||
|
||||
return new MethodNode(Opcodes.ASM4, access, name, desc, signature, exceptions) {
|
||||
@Override
|
||||
public void visitMethodInsn(int opcode, @NotNull String owner, String name, @NotNull String desc, boolean itf) {
|
||||
MethodInfo methodCall = new MethodInfo(owner, name, desc);
|
||||
if (inlinedMethods.contains(methodCall)) {
|
||||
MethodInfo fromCall = new MethodInfo(className.get(), this.name, this.desc);
|
||||
//skip facades
|
||||
if (methodCall.owner.startsWith(fromCall.owner + "-")) {
|
||||
return;
|
||||
}
|
||||
|
||||
//skip delegation to trait impl from child class
|
||||
if (methodCall.owner.endsWith(JvmAbi.TRAIT_IMPL_SUFFIX) && !fromCall.owner.equals(methodCall.owner)) {
|
||||
|
||||
@@ -44,7 +44,7 @@ public class KotlinSyntheticClassAnnotationTest extends CodegenTestCase {
|
||||
|
||||
public void testPackagePart() {
|
||||
doTest("fun foo() = 42",
|
||||
"-",
|
||||
"$",
|
||||
PACKAGE_PART);
|
||||
}
|
||||
|
||||
@@ -62,25 +62,25 @@ public class KotlinSyntheticClassAnnotationTest extends CodegenTestCase {
|
||||
|
||||
public void testSamLambda() {
|
||||
doTest("val foo = Thread { }",
|
||||
"$",
|
||||
"$1",
|
||||
SAM_LAMBDA);
|
||||
}
|
||||
|
||||
public void testCallableReferenceWrapper() {
|
||||
doTest("val f = String::get",
|
||||
"$",
|
||||
"$1",
|
||||
CALLABLE_REFERENCE_WRAPPER);
|
||||
}
|
||||
|
||||
public void testLocalFunction() {
|
||||
doTest("fun foo() { fun bar() {} }",
|
||||
"$",
|
||||
"$1",
|
||||
LOCAL_FUNCTION);
|
||||
}
|
||||
|
||||
public void testAnonymousFunction() {
|
||||
doTest("val f = {}",
|
||||
"$",
|
||||
"$1",
|
||||
ANONYMOUS_FUNCTION);
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ public class KotlinSyntheticClassAnnotationTest extends CodegenTestCase {
|
||||
|
||||
public void testAnonymousObject() {
|
||||
doTest("val o = object {}",
|
||||
"$",
|
||||
"$1",
|
||||
ANONYMOUS_OBJECT);
|
||||
}
|
||||
|
||||
|
||||
@@ -71,17 +71,17 @@ public class OuterClassGenTest extends CodegenTestCase {
|
||||
}
|
||||
|
||||
public void testObjectLiteralInPackageClass() throws Exception {
|
||||
OuterClassInfo expectedInfo = new OuterClassInfo("foo/FooPackage-outerClassInfo-", null, null);
|
||||
OuterClassInfo expectedInfo = new OuterClassInfo("foo/FooPackage$outerClassInfo$", null, null);
|
||||
doCustomTest("foo.FooPackage$packageObjectLiteral$1", expectedInfo, "outerClassInfo");
|
||||
}
|
||||
|
||||
public void testLocalClassInTopLevelFunction() throws Exception {
|
||||
OuterClassInfo expectedInfo = new OuterClassInfo("foo/FooPackage-outerClassInfo-", "packageMethod", "(Lfoo/Foo;)V");
|
||||
OuterClassInfo expectedInfo = new OuterClassInfo("foo/FooPackage$outerClassInfo$", "packageMethod", "(Lfoo/Foo;)V");
|
||||
doCustomTest("foo.FooPackage$packageMethod$PackageLocalClass", expectedInfo, "outerClassInfo");
|
||||
}
|
||||
|
||||
public void testLocalObjectInTopLevelFunction() throws Exception {
|
||||
OuterClassInfo expectedInfo = new OuterClassInfo("foo/FooPackage-outerClassInfo-", "packageMethod", "(Lfoo/Foo;)V");
|
||||
OuterClassInfo expectedInfo = new OuterClassInfo("foo/FooPackage$outerClassInfo$", "packageMethod", "(Lfoo/Foo;)V");
|
||||
doCustomTest("foo.FooPackage$packageMethod$PackageLocalObject", expectedInfo, "outerClassInfo");
|
||||
}
|
||||
|
||||
|
||||
@@ -81,6 +81,13 @@ public class JvmClassName {
|
||||
return fqName;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public FqName getPackageFqName() {
|
||||
int lastSlash = internalName.lastIndexOf("/");
|
||||
if (lastSlash == -1) return FqName.ROOT;
|
||||
return new FqName(internalName.substring(0, lastSlash).replace('/', '.'));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getInternalName() {
|
||||
return internalName;
|
||||
|
||||
+1
-1
@@ -109,7 +109,7 @@ private fun findPackagePartFileNamesForElement(elementAt: JetElement): List<Stri
|
||||
val file = elementAt.getContainingJetFile()
|
||||
|
||||
val packagePartName = PackagePartClassUtils.getPackagePartFqName(file).shortName().asString()
|
||||
val packagePartNameWoHash = packagePartName.substring(0, packagePartName.lastIndexOf("-"))
|
||||
val packagePartNameWoHash = packagePartName.substring(0, packagePartName.lastIndexOf("$"))
|
||||
|
||||
val libraryEntry = LibraryUtil.findLibraryEntry(file.getVirtualFile(), project)
|
||||
val scope = if (libraryEntry is LibraryOrderEntry){
|
||||
|
||||
@@ -26,8 +26,8 @@ class MyDelegateThrowsException {
|
||||
}
|
||||
|
||||
// PRINT_FRAME
|
||||
frame = main():8, DelegatedPropertyInClassPackage-@packagePartHASH {delegatedPropertyInClass}
|
||||
static = static = delegatedPropertyInClass.DelegatedPropertyInClassPackage-@packagePartHASH
|
||||
frame = main():8, DelegatedPropertyInClassPackage$@packagePartHASH {delegatedPropertyInClass}
|
||||
static = static = delegatedPropertyInClass.DelegatedPropertyInClassPackage$@packagePartHASH
|
||||
local = args: java.lang.String[] = {java.lang.String[0]@uniqueID}
|
||||
local = a: delegatedPropertyInClass.A = {delegatedPropertyInClass.A@uniqueID}
|
||||
field = prop$delegate: delegatedPropertyInClass.MyDelegate = {delegatedPropertyInClass.MyDelegate@uniqueID}
|
||||
|
||||
@@ -22,8 +22,8 @@ fun A.foo() {
|
||||
|
||||
// EXPRESSION: prop
|
||||
// RESULT: 1: I
|
||||
frame = foo():13, FrameExtensionFunPackage-@packagePartHASH {frameExtensionFun}
|
||||
static = static = frameExtensionFun.FrameExtensionFunPackage-@packagePartHASH
|
||||
frame = foo():13, FrameExtensionFunPackage$@packagePartHASH {frameExtensionFun}
|
||||
static = static = frameExtensionFun.FrameExtensionFunPackage$@packagePartHASH
|
||||
local = $receiver: frameExtensionFun.A = {frameExtensionFun.A@uniqueID}
|
||||
field = prop: int = 1
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
@@ -30,8 +30,8 @@ fun main(args: Array<String>) {
|
||||
|
||||
// EXPRESSION: val1 + topVal1
|
||||
// RESULT: 2: I
|
||||
frame = main():9, FrameSimplePackage-@packagePartHASH {frameSimple}
|
||||
static = static = frameSimple.FrameSimplePackage-@packagePartHASH
|
||||
frame = main():9, FrameSimplePackage$@packagePartHASH {frameSimple}
|
||||
static = static = frameSimple.FrameSimplePackage$@packagePartHASH
|
||||
field = topVal1: int = 1
|
||||
local = args: java.lang.String[] = {java.lang.String[0]@uniqueID}
|
||||
local = val1: int = 1
|
||||
|
||||
+1
-1
@@ -228,7 +228,7 @@ public abstract class AbstractKotlinEvaluateExpressionTest : KotlinDebuggerTestB
|
||||
val descriptor: NodeDescriptorImpl = node.getDescriptor()!!
|
||||
if (descriptor is DefaultNodeDescriptor) return
|
||||
|
||||
val label = descriptor.getLabel()!!.replaceAll("-[\\w]*-[\\w|\\d]+", "-@packagePartHASH")
|
||||
val label = descriptor.getLabel()!!.replaceAll("Package\\$[\\w]*\\$[0-9a-f]+", "Package\\$@packagePartHASH")
|
||||
if (label.endsWith(XDebuggerUIConstants.COLLECTING_DATA_MESSAGE)) return
|
||||
|
||||
val curIndent = " ".repeat(indent)
|
||||
|
||||
@@ -413,7 +413,7 @@ public class IncrementalCacheImpl(val baseDir: File): StorageOwner, IncrementalC
|
||||
result.add(packagePartClassName)
|
||||
}
|
||||
else {
|
||||
val previousPackageFqName = JvmClassName.byInternalName(packagePartClassName).getFqNameForClassNameWithoutDollars().parent()
|
||||
val previousPackageFqName = JvmClassName.byInternalName(packagePartClassName).getPackageFqName()
|
||||
val currentPackageFqName = compiledSourceFilesToFqName[sourceFile]
|
||||
if (currentPackageFqName != null && currentPackageFqName != previousPackageFqName.asString()) {
|
||||
result.add(packagePartClassName)
|
||||
@@ -432,7 +432,7 @@ public class IncrementalCacheImpl(val baseDir: File): StorageOwner, IncrementalC
|
||||
map.processKeysWithExistingMapping { key ->
|
||||
val packagePartClassName = map[key!!]!!
|
||||
|
||||
val packageFqName = JvmClassName.byInternalName(packagePartClassName).getFqNameForClassNameWithoutDollars().parent()
|
||||
val packageFqName = JvmClassName.byInternalName(packagePartClassName).getPackageFqName()
|
||||
|
||||
result.add(packageFqName)
|
||||
|
||||
|
||||
@@ -241,9 +241,11 @@ public abstract class AbstractIncrementalJpsTest : JpsBuildTestCase() {
|
||||
override fun logLine(message: String?) {
|
||||
|
||||
fun String.replaceHashWithStar(): String {
|
||||
val lastHyphen = this.lastIndexOf('-')
|
||||
if (lastHyphen != -1 && substring(lastHyphen + 1).matches("[0-9a-f]{1,8}\\.class")) {
|
||||
return substring(0, lastHyphen) + "-*.class"
|
||||
if (this contains "Package$") {
|
||||
val lastDollar = this.lastIndexOf('$')
|
||||
if (lastDollar != -1 && substring(lastDollar + 1).matches("[0-9a-f]{1,8}\\.class")) {
|
||||
return substring(0, lastDollar) + "$*.class"
|
||||
}
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Cleaning output files:
|
||||
out/production/module2/b/BPackage-module2_b-*.class
|
||||
out/production/module2/b/BPackage$module2_b$*.class
|
||||
out/production/module2/b/BPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
@@ -7,9 +7,9 @@ module2/src/module2_b.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module1/a/A.class
|
||||
out/production/module1/a/APackage-module1_a-*.class
|
||||
out/production/module1/a/APackage$module1_a$*.class
|
||||
out/production/module1/a/APackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
module1/src/module1_a.kt
|
||||
End of files
|
||||
End of files
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-b-*.class
|
||||
out/production/module/test/TestPackage-usage-*.class
|
||||
out/production/module/test/TestPackage$b$*.class
|
||||
out/production/module/test/TestPackage$usage$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-b-*.class
|
||||
out/production/module/test/TestPackage-usage-*.class
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage$b$*.class
|
||||
out/production/module/test/TestPackage$usage$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-const-*.class
|
||||
out/production/module/test/TestPackage$const$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
@@ -8,7 +8,7 @@ End of files
|
||||
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-const-*.class
|
||||
out/production/module/test/TestPackage$const$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-other-*.class
|
||||
out/production/module/test/TestPackage$other$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -6,7 +6,7 @@ src/inline.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/inline/Klass.class
|
||||
out/production/module/usage/UsagePackage-usage-*.class
|
||||
out/production/module/usage/UsagePackage$usage$*.class
|
||||
out/production/module/usage/UsagePackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -9,9 +9,9 @@ Compiling files:
|
||||
src/A.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-other-*.class
|
||||
out/production/module/test/TestPackage$other$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/other.kt
|
||||
End of files
|
||||
End of files
|
||||
|
||||
@@ -5,9 +5,9 @@ Compiling files:
|
||||
src/class.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-usage-*.class
|
||||
out/production/module/test/TestPackage$usage$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/usage.kt
|
||||
End of files
|
||||
End of files
|
||||
|
||||
@@ -3,4 +3,4 @@ out/production/module/test/Klass.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/class.kt
|
||||
End of files
|
||||
End of files
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Cleaning output files:
|
||||
out/production/module/_DefaultPackage-usage-*.class
|
||||
out/production/module/_DefaultPackage$usage$*.class
|
||||
out/production/module/_DefaultPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/Klass$object.class
|
||||
out/production/module/test/Klass.class
|
||||
out/production/module/test/TestPackage-const-*.class
|
||||
out/production/module/test/TestPackage$const$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Cleaning output files:
|
||||
out/production/module/_DefaultPackage-a-*.class
|
||||
out/production/module/_DefaultPackage$a$*.class
|
||||
out/production/module/_DefaultPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-a-*.class
|
||||
out/production/module/test/TestPackage$a$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Cleaning output files:
|
||||
out/production/module/bar/BarPackage-c-*.class
|
||||
out/production/module/bar/BarPackage$c$*.class
|
||||
out/production/module/bar/BarPackage.class
|
||||
out/production/module/foo/FooPackage-b-*.class
|
||||
out/production/module/foo/FooPackage$b$*.class
|
||||
out/production/module/foo/FooPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
@@ -9,7 +9,7 @@ src/b.kt
|
||||
src/c.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/foo/FooPackage-a-*.class
|
||||
out/production/module/foo/FooPackage$a$*.class
|
||||
out/production/module/foo/FooPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -3,4 +3,4 @@ out/production/module/test/Foo.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/Foo.kt
|
||||
End of files
|
||||
End of files
|
||||
|
||||
+3
-3
@@ -1,13 +1,13 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-a-*.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
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-a-*.class
|
||||
out/production/module/test/TestPackage-b-*.class
|
||||
out/production/module/test/TestPackage$a$*.class
|
||||
out/production/module/test/TestPackage$b$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Cleaning output files:
|
||||
out/production/module/inline/InlinePackage-inline-*.class
|
||||
out/production/module/inline/InlinePackage$inline$*.class
|
||||
out/production/module/inline/InlinePackage.class
|
||||
out/production/module/inline/Klass.class
|
||||
End of files
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
Cleaning output files:
|
||||
out/production/module/b/BPackage-b2-*.class
|
||||
out/production/module/b/BPackage$b2$*.class
|
||||
out/production/module/b/BPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/a2.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/a/APackage-a1-*.class
|
||||
out/production/module/a/APackage$a1$*.class
|
||||
out/production/module/a/APackage.class
|
||||
out/production/module/b/BPackage-b1-*.class
|
||||
out/production/module/b/BPackage$b1$*.class
|
||||
out/production/module/b/BPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -3,4 +3,4 @@ out/production/module/test/Object.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/const.kt
|
||||
End of files
|
||||
End of files
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-a-*.class
|
||||
out/production/module/test/TestPackage$a$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
@@ -9,7 +9,7 @@ End of files
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/klass/Klass.class
|
||||
out/production/module/test/TestPackage-a-*.class
|
||||
out/production/module/test/TestPackage$a$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-const-*.class
|
||||
out/production/module/test/TestPackage$const$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -2,7 +2,7 @@ Compiling files:
|
||||
src/b.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-a-*.class
|
||||
out/production/module/test/TestPackage$a$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-b-*.class
|
||||
out/production/module/test/TestPackage$b$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/b.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-a-*.class
|
||||
out/production/module/test/TestPackage$a$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-a-*.class
|
||||
out/production/module/test/TestPackage$a$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
@@ -8,13 +8,13 @@ End of files
|
||||
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-b-*.class
|
||||
out/production/module/test/TestPackage$b$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-a-*.class
|
||||
out/production/module/test/TestPackage$a$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-b-*.class
|
||||
out/production/module/test/TestPackage$b$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/other/OtherPackage-other-*.class
|
||||
out/production/module/other/OtherPackage$other$*.class
|
||||
out/production/module/other/OtherPackage.class
|
||||
out/production/module/test/TestPackage-a-*.class
|
||||
out/production/module/test/TestPackage$a$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
@@ -17,7 +17,7 @@ End of files
|
||||
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/other/OtherPackage-other-*.class
|
||||
out/production/module/other/OtherPackage$other$*.class
|
||||
out/production/module/other/OtherPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-a-*.class
|
||||
out/production/module/test/TestPackage$a$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
@@ -8,7 +8,7 @@ End of files
|
||||
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-b-*.class
|
||||
out/production/module/test/TestPackage$b$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-usage-*.class
|
||||
out/production/module/test/TestPackage$usage$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
Cleaning output files:
|
||||
out/production/module/inline/InlinePackage-inline-*.class
|
||||
out/production/module/inline/InlinePackage$inline$*.class
|
||||
out/production/module/inline/InlinePackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/inline.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/inline/InlinePackage-inline-*.class
|
||||
out/production/module/inline/InlinePackage$inline$*.class
|
||||
out/production/module/inline/InlinePackage.class
|
||||
out/production/module/usage/UsagePackage-usage-*.class
|
||||
out/production/module/usage/UsagePackage$usage$*.class
|
||||
out/production/module/usage/UsagePackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/inline.kt
|
||||
src/usage.kt
|
||||
End of files
|
||||
End of files
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-usage-*.class
|
||||
out/production/module/test/TestPackage$usage$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-a-*.class
|
||||
out/production/module/test/TestPackage$a$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-a-*.class
|
||||
out/production/module/test/TestPackage$a$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
@@ -11,7 +11,7 @@ Compiling files:
|
||||
src/b.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/test2/Test2Package-a-*.class
|
||||
out/production/module/test2/Test2Package$a$*.class
|
||||
out/production/module/test2/Test2Package.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-a-*.class
|
||||
out/production/module/test/TestPackage$a$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-b-*.class
|
||||
out/production/module/test/TestPackage$b$*.class
|
||||
End of files
|
||||
Compiling files:
|
||||
End of files
|
||||
End of files
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-fun-*.class
|
||||
out/production/module/test/TestPackage$fun$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/fun.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-usage-*.class
|
||||
out/production/module/test/TestPackage$usage$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -4,4 +4,4 @@ out/production/module/test/Foo.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/Foo.kt
|
||||
End of files
|
||||
End of files
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Cleaning output files:
|
||||
out/production/module/foo/FooPackage-a-*.class
|
||||
out/production/module/foo/FooPackage$a$*.class
|
||||
out/production/module/foo/FooPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/a.kt
|
||||
End of files
|
||||
End of files
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-fun-*.class
|
||||
out/production/module/test/TestPackage$fun$*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-a-*.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
|
||||
End of files
|
||||
|
||||
Reference in New Issue
Block a user