Include package part name to top level closure names
#KT-4234 Fixed
#KT-4496 Fixed
Original commit: c30aa7db84
This commit is contained in:
@@ -33,6 +33,7 @@ import kotlin.test.fail
|
||||
import java.util.HashMap
|
||||
import org.jetbrains.jet.utils.keysToMap
|
||||
import org.jetbrains.jps.incremental.messages.BuildMessage
|
||||
import java.util.regex.Pattern
|
||||
|
||||
public abstract class AbstractIncrementalJpsTest : JpsBuildTestCase() {
|
||||
private var testDataDir: File by Delegates.notNull()
|
||||
@@ -239,19 +240,21 @@ public abstract class AbstractIncrementalJpsTest : JpsBuildTestCase() {
|
||||
override fun isEnabled(): Boolean = true
|
||||
|
||||
override fun logLine(message: String?) {
|
||||
|
||||
fun String.replaceHashWithStar(): String {
|
||||
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"
|
||||
}
|
||||
val matcher = STRIP_PACKAGE_PART_HASH_PATTERN.matcher(this)
|
||||
if (matcher.find()) {
|
||||
return matcher.replaceAll("\\$*")
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
logBuf.append(message!!.trimLeading(rootPath + "/").replaceHashWithStar()).append('\n')
|
||||
}
|
||||
|
||||
class object {
|
||||
// We suspect sequences of several consecutive hexadecimal digits to be a package part hash code
|
||||
val STRIP_PACKAGE_PART_HASH_PATTERN = Pattern.compile("\\$([0-9a-f]{5,8})")
|
||||
}
|
||||
}
|
||||
|
||||
private abstract class Modification(val path: String) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Cleaning output files:
|
||||
out/production/module/outer/nested/NestedPackage$main$1.class
|
||||
out/production/module/outer/nested/NestedPackage-nested-*.class
|
||||
out/production/module/outer/nested/NestedPackage$nested$*$main$1.class
|
||||
out/production/module/outer/nested/NestedPackage$nested$*.class
|
||||
out/production/module/outer/nested/NestedPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
Reference in New Issue
Block a user