dokka
dokka copied to clipboard
DokkaHtml task fails with `Collection contains no element matching the predicate` exception
Describe the bug
Gradle task dokkaHtml fails with the mentioned exception when trying to document an abstract property of a sealed class.
Example code below.
Expected behaviour Task should succeed since the code is documented as expected.
To Reproduce
Add the following code and run ./gradlew dokkaHtml
/**
* Result
*
* @property info info
*/
sealed class Result {
abstract val info: String
/**
* Success
*/
data class Success(override val info: String) : Result()
/**
* Error
*/
data object Error : Result() {
override val info: String
get() = "Error"
}
}
The task doesn't fail when the info property is implemented as a constructor parameter of an Error class.
Dokka configuration Configuration of dokka used to reproduce the bug
dokkaSourceSets {
configureEach {
documentedVisibilities.set(setOf(DokkaConfiguration.Visibility.PUBLIC))
reportUndocumented.set(true)
skipDeprecated.set(true)
skipEmptyPackages.set(true)
perPackageOptions {
matchingRegex.set("module-name-where-the code-is")
suppress.set(false)
reportUndocumented.set(true)
}
suppress.set(true)
}
}
}
Installation
- Operating system: macOS
- Build tool: Gradle v8.7
- Dokka version: 1.9.10
Hey! I can't reproduce the issue with both Dokka 1.9.10 and 1.9.20. Could you please provide a reproducer via GitHub repo if possible? Or may be you do have full stack trace?