Compilation errors are rendered to log without "Kotlin:ERROR:" prefix and without path to file. Sometimes javac adds path to file, sometimes doesn't. This had led tests to fail on some platforms.
Original commit: 9c880de735
This commit is contained in:
@@ -69,10 +69,9 @@ public abstract class AbstractIncrementalJpsTest : JpsBuildTestCase() {
|
|||||||
val errorMessages =
|
val errorMessages =
|
||||||
buildResult
|
buildResult
|
||||||
.getMessages(BuildMessage.Kind.ERROR)
|
.getMessages(BuildMessage.Kind.ERROR)
|
||||||
|
.map { it.getMessageText() }
|
||||||
|
.map { it.replaceAll("^[^:]+:\\d+:\\s+", "") }
|
||||||
.joinToString("\n")
|
.joinToString("\n")
|
||||||
.replace(File.separatorChar, '/')
|
|
||||||
.replace("/" + workDirPath, "\$PROJECT") // Sometimes path is rendered as "/C:/foo/bar" on Windows
|
|
||||||
.replace(workDirPath, "\$PROJECT")
|
|
||||||
return logger.log + "$COMPILATION_FAILED\n" + errorMessages + "\n"
|
return logger.log + "$COMPILATION_FAILED\n" + errorMessages + "\n"
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -9,5 +9,5 @@ src/class1.kt
|
|||||||
src/class2.kt
|
src/class2.kt
|
||||||
End of files
|
End of files
|
||||||
COMPILATION FAILED
|
COMPILATION FAILED
|
||||||
Kotlin:ERROR:Redeclaration: Klass
|
Redeclaration: Klass
|
||||||
Kotlin:ERROR:Redeclaration: Klass
|
Redeclaration: Klass
|
||||||
+2
-2
@@ -6,7 +6,7 @@ Compiling files:
|
|||||||
src/usage.kt
|
src/usage.kt
|
||||||
End of files
|
End of files
|
||||||
COMPILATION FAILED
|
COMPILATION FAILED
|
||||||
Kotlin:ERROR:Expecting an expression
|
Expecting an expression
|
||||||
|
|
||||||
|
|
||||||
Cleaning output files:
|
Cleaning output files:
|
||||||
@@ -15,4 +15,4 @@ End of files
|
|||||||
Compiling files:
|
Compiling files:
|
||||||
src/fun.kt
|
src/fun.kt
|
||||||
src/usage.kt
|
src/usage.kt
|
||||||
End of files
|
End of files
|
||||||
+2
-2
@@ -6,9 +6,9 @@ Compiling files:
|
|||||||
src/usage.kt
|
src/usage.kt
|
||||||
End of files
|
End of files
|
||||||
COMPILATION FAILED
|
COMPILATION FAILED
|
||||||
Kotlin:ERROR:Expecting an expression
|
Expecting an expression
|
||||||
|
|
||||||
|
|
||||||
Compiling files:
|
Compiling files:
|
||||||
src/usage.kt
|
src/usage.kt
|
||||||
End of files
|
End of files
|
||||||
+2
-2
@@ -6,6 +6,6 @@ Compiling files:
|
|||||||
src/fun2.kt
|
src/fun2.kt
|
||||||
End of files
|
End of files
|
||||||
COMPILATION FAILED
|
COMPILATION FAILED
|
||||||
Kotlin:ERROR:Platform declaration clash: The following declarations have the same JVM signature (function(Ljava/util/List;)V):
|
Platform declaration clash: The following declarations have the same JVM signature (function(Ljava/util/List;)V):
|
||||||
fun function(list: kotlin.List<kotlin.Any>): kotlin.Unit
|
fun function(list: kotlin.List<kotlin.Any>): kotlin.Unit
|
||||||
fun function(list: kotlin.List<kotlin.String>): kotlin.Unit
|
fun function(list: kotlin.List<kotlin.String>): kotlin.Unit
|
||||||
@@ -6,6 +6,6 @@ Compiling files:
|
|||||||
src/fun2.kt
|
src/fun2.kt
|
||||||
End of files
|
End of files
|
||||||
COMPILATION FAILED
|
COMPILATION FAILED
|
||||||
Kotlin:ERROR:Platform declaration clash: The following declarations have the same JVM signature (function()V):
|
Platform declaration clash: The following declarations have the same JVM signature (function()V):
|
||||||
fun function(): kotlin.Unit
|
fun function(): kotlin.Unit
|
||||||
fun function(): kotlin.Unit
|
fun function(): kotlin.Unit
|
||||||
@@ -6,6 +6,6 @@ Compiling files:
|
|||||||
src/prop2.kt
|
src/prop2.kt
|
||||||
End of files
|
End of files
|
||||||
COMPILATION FAILED
|
COMPILATION FAILED
|
||||||
Kotlin:ERROR:Platform declaration clash: The following declarations have the same JVM signature (getProperty()I):
|
Platform declaration clash: The following declarations have the same JVM signature (getProperty()I):
|
||||||
fun <get-property>(): kotlin.Int
|
fun <get-property>(): kotlin.Int
|
||||||
fun <get-property>(): kotlin.Int
|
fun <get-property>(): kotlin.Int
|
||||||
+2
-2
@@ -11,5 +11,5 @@ Compiling files:
|
|||||||
src/Sub.kt
|
src/Sub.kt
|
||||||
End of files
|
End of files
|
||||||
COMPILATION FAILED
|
COMPILATION FAILED
|
||||||
Kotlin:ERROR:Cannot weaken access privilege 'public' for 'y' in 'Super'
|
Cannot weaken access privilege 'public' for 'y' in 'Super'
|
||||||
Kotlin:ERROR:'y' hides member of supertype 'Super' and needs 'override' modifier
|
'y' hides member of supertype 'Super' and needs 'override' modifier
|
||||||
+1
-1
@@ -15,4 +15,4 @@ src/willBeResolvedToOther.kt
|
|||||||
src/willBeUnresolved.kt
|
src/willBeUnresolved.kt
|
||||||
End of files
|
End of files
|
||||||
COMPILATION FAILED
|
COMPILATION FAILED
|
||||||
Kotlin:ERROR:Unresolved reference: f
|
Unresolved reference: f
|
||||||
+4
-4
@@ -17,7 +17,7 @@ src/usageWithFunctionExpression.kt
|
|||||||
src/usageWithFunctionLiteral.kt
|
src/usageWithFunctionLiteral.kt
|
||||||
End of files
|
End of files
|
||||||
COMPILATION FAILED
|
COMPILATION FAILED
|
||||||
Kotlin:ERROR:Expression 'SamInterface' cannot be invoked as a function. The function invoke() is not found
|
Expression 'SamInterface' cannot be invoked as a function. The function invoke() is not found
|
||||||
Kotlin:ERROR:Please specify constructor invocation; classifier 'SamInterface' does not have a class object
|
Please specify constructor invocation; classifier 'SamInterface' does not have a class object
|
||||||
Kotlin:ERROR:Expression 'SamInterface' cannot be invoked as a function. The function invoke() is not found
|
Expression 'SamInterface' cannot be invoked as a function. The function invoke() is not found
|
||||||
Kotlin:ERROR:Please specify constructor invocation; classifier 'SamInterface' does not have a class object
|
Please specify constructor invocation; classifier 'SamInterface' does not have a class object
|
||||||
@@ -9,6 +9,6 @@ Compiling files:
|
|||||||
src/WillBeUnresolved.java
|
src/WillBeUnresolved.java
|
||||||
End of files
|
End of files
|
||||||
COMPILATION FAILED
|
COMPILATION FAILED
|
||||||
java:ERROR:$PROJECT/src/WillBeUnresolved.java:3: cannot find symbol
|
cannot find symbol
|
||||||
symbol : method f(java.lang.String)
|
symbol : method f(java.lang.String)
|
||||||
location: class test.TestPackage
|
location: class test.TestPackage
|
||||||
+1
-1
@@ -8,4 +8,4 @@ Compiling files:
|
|||||||
src/Sub.java
|
src/Sub.java
|
||||||
End of files
|
End of files
|
||||||
COMPILATION FAILED
|
COMPILATION FAILED
|
||||||
java:ERROR:$PROJECT/src/Sub.java:2: y() in Sub cannot override y() in Super; overridden method is final
|
y() in Sub cannot override y() in Super; overridden method is final
|
||||||
+2
-2
@@ -9,6 +9,6 @@ Compiling files:
|
|||||||
src/WillBeUnresolved.java
|
src/WillBeUnresolved.java
|
||||||
End of files
|
End of files
|
||||||
COMPILATION FAILED
|
COMPILATION FAILED
|
||||||
java:ERROR:$PROJECT/src/WillBeUnresolved.java:3: cannot find symbol
|
cannot find symbol
|
||||||
symbol : method getProp()
|
symbol : method getProp()
|
||||||
location: class test.TestPackage
|
location: class test.TestPackage
|
||||||
Reference in New Issue
Block a user