[FE 1.0] Add compiler flag for rendering internal diagnostic names in error messages

This commit is contained in:
Dmitriy Novozhilov
2022-01-21 13:07:20 +03:00
committed by TeamCityServer
parent b9c22a5e5e
commit dd953908df
28 changed files with 112 additions and 29 deletions
@@ -27,7 +27,7 @@ class JsTranslationResultHandler(testServices: TestServices) : JsBinaryArtifactH
if (result !is TranslationResult.Success) {
val outputStream = ByteArrayOutputStream()
val collector = PrintingMessageCollector(PrintStream(outputStream), MessageRenderer.PLAIN_FULL_PATHS, true)
AnalyzerWithCompilerReport.reportDiagnostics(result.diagnostics, collector)
AnalyzerWithCompilerReport.reportDiagnostics(result.diagnostics, collector, renderInternalDiagnosticName = false)
val messages = outputStream.toByteArray().toString(Charset.forName("UTF-8"))
throw AssertionError("The following errors occurred compiling test:\n$messages")
}
@@ -67,7 +67,7 @@ abstract class AbstractJsLineNumberTest : KotlinTestWithEnvironment() {
if (translationResult !is TranslationResult.Success) {
val outputStream = ByteArrayOutputStream()
val collector = PrintingMessageCollector(PrintStream(outputStream), MessageRenderer.PLAIN_FULL_PATHS, true)
AnalyzerWithCompilerReport.reportDiagnostics(translationResult.diagnostics, collector)
AnalyzerWithCompilerReport.reportDiagnostics(translationResult.diagnostics, collector, renderInternalDiagnosticName = false)
val messages = outputStream.toByteArray().toString(Charset.forName("UTF-8"))
throw AssertionError("The following errors occurred compiling test:\n" + messages)
}