CLI: improve diagnostic message format
- render the whole line where the error/warning points to, if any, and another line with '^', like other compilers do - lowercase diagnostic severity - decapitalize the message if it doesn't start with a proper name
This commit is contained in:
+3
-1
@@ -1,2 +1,4 @@
|
||||
ERROR: compiler/testData/cli/js/diagnosticForClassLiteral.kt: (6, 5) Cannot translate (not supported yet): 'A::class'
|
||||
compiler/testData/cli/js/diagnosticForClassLiteral.kt:6:5: error: cannot translate (not supported yet): 'A::class'
|
||||
A::class
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
ERROR: compiler/testData/cli/js/diagnosticForUnhandledElements.kt: (9, 17) Cannot translate (not supported yet): '@fancy 1'
|
||||
COMPILATION_ERROR
|
||||
compiler/testData/cli/js/diagnosticForUnhandledElements.kt:9:17: error: cannot translate (not supported yet): '@fancy 1'
|
||||
return (@fancy 1)
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
ERROR: compiler/testData/cli/js/diagnosticWhenReferenceToBuiltinsMember.kt: (4, 5) Callable references for builtin members are not supported yet: 'Int::toByte'
|
||||
ERROR: compiler/testData/cli/js/diagnosticWhenReferenceToBuiltinsMember.kt: (5, 5) Callable references for builtin members are not supported yet: 'String::length'
|
||||
compiler/testData/cli/js/diagnosticWhenReferenceToBuiltinsMember.kt:4:5: error: callable references for builtin members are not supported yet: 'Int::toByte'
|
||||
Int::toByte
|
||||
^
|
||||
compiler/testData/cli/js/diagnosticWhenReferenceToBuiltinsMember.kt:5:5: error: callable references for builtin members are not supported yet: 'String::length'
|
||||
String::length
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
+2
-2
@@ -1,2 +1,2 @@
|
||||
ERROR: No source files
|
||||
COMPILATION_ERROR
|
||||
error: no source files
|
||||
COMPILATION_ERROR
|
||||
|
||||
+7
-3
@@ -1,3 +1,7 @@
|
||||
ERROR: compiler/testData/cli/js/inlineCycle.kt: (2, 5) The 'b' invocation is a part of inline cycle
|
||||
ERROR: compiler/testData/cli/js/inlineCycle.kt: (15, 5) The 'a' invocation is a part of inline cycle
|
||||
COMPILATION_ERROR
|
||||
compiler/testData/cli/js/inlineCycle.kt:2:5: error: the 'b' invocation is a part of inline cycle
|
||||
b(l)
|
||||
^
|
||||
compiler/testData/cli/js/inlineCycle.kt:15:5: error: the 'a' invocation is a part of inline cycle
|
||||
a(p)
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
ERROR: Path 'not/existing/path' does not exist
|
||||
error: path 'not/existing/path' does not exist
|
||||
COMPILATION_ERROR
|
||||
|
||||
+2
-2
@@ -1,2 +1,2 @@
|
||||
ERROR: Source file or directory not found: not/existing/path
|
||||
COMPILATION_ERROR
|
||||
error: source file or directory not found: not/existing/path
|
||||
COMPILATION_ERROR
|
||||
|
||||
+2
-2
@@ -1,2 +1,2 @@
|
||||
ERROR: 'compiler/testData/integration/ant/js/simpleWithStdlibAndFolderAsAnotherLib' is not a valid Kotlin Javascript library
|
||||
COMPILATION_ERROR
|
||||
error: 'compiler/testData/integration/ant/js/simpleWithStdlibAndFolderAsAnotherLib' is not a valid Kotlin Javascript library
|
||||
COMPILATION_ERROR
|
||||
|
||||
+2
-2
@@ -1,2 +1,2 @@
|
||||
ERROR: Cannot open output file 'compiler/testData/cli/js': is a directory
|
||||
COMPILATION_ERROR
|
||||
error: cannot open output file 'compiler/testData/cli/js': is a directory
|
||||
COMPILATION_ERROR
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
ERROR: Output postfix file 'not/existing/path' not found
|
||||
error: output postfix file 'not/existing/path' not found
|
||||
COMPILATION_ERROR
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
ERROR: Output prefix file 'not/existing/path' not found
|
||||
error: output prefix file 'not/existing/path' not found
|
||||
COMPILATION_ERROR
|
||||
|
||||
+2
-2
@@ -1,2 +1,2 @@
|
||||
ERROR: File 'compiler/testData/cli/js/wrongAbiVersionLib/wrongAbiLib.meta.js' was compiled with an incompatible version of Kotlin. Its ABI version is 0, expected ABI version is 3
|
||||
COMPILATION_ERROR
|
||||
error: file 'compiler/testData/cli/js/wrongAbiVersionLib/wrongAbiLib.meta.js' was compiled with an incompatible version of Kotlin. Its ABI version is 0, expected ABI version is 3
|
||||
COMPILATION_ERROR
|
||||
|
||||
Reference in New Issue
Block a user