From b78581dd1f46bf6326c15bc3f3e11e3dd2315e41 Mon Sep 17 00:00:00 2001 From: Eugene Petrenko Date: Thu, 13 Sep 2018 14:02:48 +0300 Subject: more logging around signature failure --- core/src/main/kotlin/Generation/DocumentationMerger.kt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/src/main/kotlin/Generation/DocumentationMerger.kt b/core/src/main/kotlin/Generation/DocumentationMerger.kt index 40a4e30d..3be6be83 100644 --- a/core/src/main/kotlin/Generation/DocumentationMerger.kt +++ b/core/src/main/kotlin/Generation/DocumentationMerger.kt @@ -84,12 +84,23 @@ class DocumentationMerger( return mergedPackage } + private fun mergeMemberGroupBy(it: DocumentationNode): String { + val signature = signatureMap[it] + + if (signature != null) { + return signature + } + + logger.error("Failed to find signature for $it in \n${it.allReferences().joinToString { "\n ${it.kind} ${it.to}" }}") + return "" + } + private fun mergeMemberReferences( from: DocumentationNode, refs: List ): List { val membersBySignature: Map> = refs.map { it.to } - .groupBy { signatureMap[it] ?: error("Unresolved signatures: ${it.kind} ${it.name}") } + .groupBy(this::mergeMemberGroupBy) val mergedMembers: MutableList = mutableListOf() for ((signature, members) in membersBySignature) { -- cgit