aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Petrenko <eugene.petrenko@jetbrains.com>2018-09-13 14:02:48 +0300
committerEugene Petrenko <eugene.petrenko@jetbrains.com>2018-09-13 14:02:48 +0300
commitb78581dd1f46bf6326c15bc3f3e11e3dd2315e41 (patch)
treec3bd9dd5d7adaa8b1b73264efbe4782888c47fbe
parent87a449eb3293448f92c938b4fe9863a32373c439 (diff)
downloaddokka-b78581dd1f46bf6326c15bc3f3e11e3dd2315e41.tar.gz
dokka-b78581dd1f46bf6326c15bc3f3e11e3dd2315e41.tar.bz2
dokka-b78581dd1f46bf6326c15bc3f3e11e3dd2315e41.zip
more logging around signature failure
-rw-r--r--core/src/main/kotlin/Generation/DocumentationMerger.kt13
1 files changed, 12 insertions, 1 deletions
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 "<ERROR>"
+ }
+
private fun mergeMemberReferences(
from: DocumentationNode,
refs: List<DocumentationReference>
): List<DocumentationReference> {
val membersBySignature: Map<String, List<DocumentationNode>> = refs.map { it.to }
- .groupBy { signatureMap[it] ?: error("Unresolved signatures: ${it.kind} ${it.name}") }
+ .groupBy(this::mergeMemberGroupBy)
val mergedMembers: MutableList<DocumentationReference> = mutableListOf()
for ((signature, members) in membersBySignature) {