diff options
author | Eugene Petrenko <eugene.petrenko@jetbrains.com> | 2018-09-13 14:02:48 +0300 |
---|---|---|
committer | Eugene Petrenko <eugene.petrenko@jetbrains.com> | 2018-09-13 14:02:48 +0300 |
commit | b78581dd1f46bf6326c15bc3f3e11e3dd2315e41 (patch) | |
tree | c3bd9dd5d7adaa8b1b73264efbe4782888c47fbe /core/src/main/kotlin | |
parent | 87a449eb3293448f92c938b4fe9863a32373c439 (diff) | |
download | dokka-b78581dd1f46bf6326c15bc3f3e11e3dd2315e41.tar.gz dokka-b78581dd1f46bf6326c15bc3f3e11e3dd2315e41.tar.bz2 dokka-b78581dd1f46bf6326c15bc3f3e11e3dd2315e41.zip |
more logging around signature failure
Diffstat (limited to 'core/src/main/kotlin')
-rw-r--r-- | core/src/main/kotlin/Generation/DocumentationMerger.kt | 13 |
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) { |