[JS] Mute the EXPORTING_JS_NAME_CLASH_ES diagnostic in TS export tests
This diagnostic started to appear after 51c920af01e3d583c552224a529abe1f6e5fcf16.
This commit is contained in:
committed by
Space Team
parent
eda30ff704
commit
61e957fc00
+5
-2
@@ -33,14 +33,17 @@ fun BinaryArtifactHandler<*>.reportKtDiagnostics(module: TestModule, ktDiagnosti
|
||||
val lightTreeEnabled = firParser == FirParser.LightTree
|
||||
|
||||
val processedModules = mutableSetOf<TestModule>()
|
||||
val diagnosticsService = testServices.diagnosticsService
|
||||
|
||||
fun processModule(module: TestModule) {
|
||||
if (!processedModules.add(module)) return
|
||||
for (testFile in module.files) {
|
||||
val ktDiagnostics = ktDiagnosticReporter.diagnosticsByFilePath["/${testFile.name}"] ?: continue
|
||||
ktDiagnostics.forEach {
|
||||
val metaInfos = it.toMetaInfos(module, testFile, globalMetadataInfoHandler, lightTreeEnabled, lightTreeComparingModeEnabled)
|
||||
globalMetadataInfoHandler.addMetadataInfosForFile(testFile, metaInfos)
|
||||
if (diagnosticsService.shouldRenderDiagnostic(module, it.factoryName, it.severity)) {
|
||||
val metaInfos = it.toMetaInfos(module, testFile, globalMetadataInfoHandler, lightTreeEnabled, lightTreeComparingModeEnabled)
|
||||
globalMetadataInfoHandler.addMetadataInfosForFile(testFile, metaInfos)
|
||||
}
|
||||
}
|
||||
}
|
||||
for ((moduleName, _, _) in module.dependsOnDependencies) {
|
||||
|
||||
+3
@@ -17,6 +17,9 @@ import org.junit.jupiter.api.fail
|
||||
class JvmBackendDiagnosticsHandler(testServices: TestServices) : JvmBinaryArtifactHandler(testServices) {
|
||||
private val reporter = ClassicDiagnosticReporter(testServices)
|
||||
|
||||
override val additionalServices: List<ServiceRegistrationData>
|
||||
get() = listOf(service(::DiagnosticsService))
|
||||
|
||||
override fun processModule(module: TestModule, info: BinaryArtifacts.Jvm) {
|
||||
reportDiagnostics(module, info)
|
||||
reportKtDiagnostics(module, info)
|
||||
|
||||
+3
@@ -22,6 +22,9 @@ class IrDiagnosticsHandler(testServices: TestServices) : AbstractIrHandler(testS
|
||||
private val diagnosticsService: DiagnosticsService
|
||||
get() = testServices.diagnosticsService
|
||||
|
||||
override val additionalServices: List<ServiceRegistrationData>
|
||||
get() = listOf(service(::DiagnosticsService))
|
||||
|
||||
private val fullDiagnosticsRenderer = FullDiagnosticsRenderer(DiagnosticsDirectives.RENDER_IR_DIAGNOSTICS_FULL_TEXT)
|
||||
|
||||
override fun processModule(module: TestModule, info: IrBackendInput) {
|
||||
|
||||
+6
@@ -6,6 +6,12 @@
|
||||
// SKIP_NODE_JS
|
||||
// INFER_MAIN_MODULE
|
||||
|
||||
// DIAGNOSTICS: -EXPORTING_JS_NAME_CLASH_ES
|
||||
// ^ This warning only concernes the ES6 mode, but since it's reported during KLIB serialization, the module system is unknown at that
|
||||
// point. Additionally, the same KLIB can be used for building JS in different module systems. Therefore, the warning is always written,
|
||||
// regardless of the project's module system.
|
||||
|
||||
|
||||
// MODULE: JS_TESTS
|
||||
// FILE: file1.kt
|
||||
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
// SKIP_NODE_JS
|
||||
// INFER_MAIN_MODULE
|
||||
|
||||
// DIAGNOSTICS: -EXPORTING_JS_NAME_CLASH_ES
|
||||
// ^ This warning only concernes the ES6 mode, but since it's reported during KLIB serialization, the module system is unknown at that
|
||||
// point. Additionally, the same KLIB can be used for building JS in different module systems. Therefore, the warning is always written,
|
||||
// regardless of the project's module system.
|
||||
|
||||
|
||||
// MODULE: JS_TESTS
|
||||
// FILE: file1.kt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user