Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DokkaHtml task fails with Collection contains no element matching the predicate exception #3911

Open
pero18 opened this issue Nov 8, 2024 · 1 comment
Labels

Comments

@pero18
Copy link

pero18 commented Nov 8, 2024

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
@pero18 pero18 added the bug label Nov 8, 2024
@whyoleg
Copy link
Collaborator

whyoleg commented Nov 14, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants