mikepenz / AboutLibraries

AboutLibraries automatically collects all dependencies and licenses of any gradle project (Kotlin MultiPlatform), and provides easy to integrate UI components for Android and Compose-jb environments
http://mikepenz.github.io/AboutLibraries/
Apache License 2.0
3.64k stars 420 forks source link

StackOverflowError when running findLibraries task #532

Closed OliverCulleyDeLange closed 4 years ago

OliverCulleyDeLange commented 4 years ago

About this issue

Execution failed for task ':app:findLibraries'.
> java.lang.StackOverflowError (no error message)
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:findLibraries'.
    at 
...
Caused by: java.lang.StackOverflowError
    at com.mikepenz.aboutlibraries.plugin.DependencyCollector.addChildDependencies(DependencyCollector.kt:79)
    at com.mikepenz.aboutlibraries.plugin.DependencyCollector.addChildDependencies(DependencyCollector.kt:83)
    at com.mikepenz.aboutlibraries.plugin.DependencyCollector.addChildDependencies(DependencyCollector.kt:83)
    at com.mikepenz.aboutlibraries.plugin.DependencyCollector.addChildDependencies(DependencyCollector.kt:83)
    at com.mikepenz.aboutlibraries.plugin.DependencyCollector.addChildDependencies(DependencyCollector.kt:83)
... etc - many more dupe lines

Details

Checklist

exportLibraries does the same as i assume they're dependent

mikepenz commented 4 years ago

@OliverCulleyDeLange could you please provide a sample app which allows us to reproduce this issue?

This problem seems to not be reproducible on our end.

Can you potentially also provide the gradle version you use?

OliverCulleyDeLange commented 4 years ago

Sure. https://github.com/OliverCulleyDeLange/bugs/tree/about-libraries-soe

mikepenz commented 4 years ago

I don't know yet why but it seems to be related to:


    // TEST
    def junitVersion = "5.7.0"
    testImplementation("org.junit.jupiter:junit-jupiter:$junitVersion")
    testCompileOnly('junit:junit:4.13') // To allow running JUnit 4 Tests
    testRuntimeOnly("org.junit.vintage:junit-vintage-engine:$junitVersion")

    def kotestVersion = '4.2.5'
    testImplementation "io.kotest:kotest-runner-junit5-jvm:$kotestVersion"
    testImplementation "io.kotest:kotest-assertions-core-jvm:$kotestVersion"

If you remove those. it will work

mikepenz commented 4 years ago

Ok I think I found the problem. And will have a new update available soon.

(The problem seems to be an infinite loop with the child dependencies in gradle, applying a patch to catch this) (additionally one of those dependencies references a *.pom file which has a invalid xml file, applying a patch to this too)

OliverCulleyDeLange commented 4 years ago

Great, thanks for the library 👍

mikepenz commented 4 years ago

I need to fix something with the plugin publishing. But I hope the update is ready in a few hours.

Thanks for the report. And thank you for the sample app. That helped a lot

mikepenz commented 4 years ago

Ok it will take a bit longer as gradle has to approve the update:

image

As I moved to only host it on gradle plugin portal. let's hope this goes through soon. :)

mikepenz commented 4 years ago

v8.4.2 is now available with the fixes for the above issue :)