Giter Site home page Giter Site logo

Comments (12)

mikepenz avatar mikepenz commented on May 30, 2024 1

Published a version of the plugin with extra logs as 10.9.1-debug01 (this version only exists for the plugin, not for the rest of the normal android dependencies)

Find the related commit here: 96f1e33

from aboutlibraries.

mikepenz avatar mikepenz commented on May 30, 2024

Thank you @Siedlerchr for the report.

Based on the stacktrace, it unfortunately looks like this is occurring internally within Gradle and not in code in our control.
Do you have an example project, or can this be somehow reproduced with the sample project there? Perhaps that could lead to additional pointers.

Possibly also worth to try upgrading to Gradle 8.3 just in case

from aboutlibraries.

Siedlerchr avatar Siedlerchr commented on May 30, 2024

Hi, I searched a bit around and it could be an issue if there's some kind of cycle in the dependencied. But I am not sure gradle/gradle#22850

Is there an option to exclude transitive deps in the plug in?

from aboutlibraries.

mikepenz avatar mikepenz commented on May 30, 2024

@Siedlerchr there is not. the plugin uses the gradle apis to query the dependencies. However it does not make a difference between top-level or transitive dependencies. As all have to be given credit for in the app.

The given code responsible for collecting:
https://github.com/mikepenz/AboutLibraries/blob/develop/plugin-build/plugin/src/main/kotlin/com/mikepenz/aboutlibraries/plugin/util/DependencyCollector.kt#L73-L125

from aboutlibraries.

Siedlerchr avatar Siedlerchr commented on May 30, 2024

Hmm thanks already . Would it be possible to provide a debug version that prints out the current dependecxy that is processed? . I'm trying to figure out the last dependency that is processed before it crashes so that I can narrow it down.
I could try that on Monday then again

from aboutlibraries.

Siedlerchr avatar Siedlerchr commented on May 30, 2024

Thanks a lot, that is really helpful and also the exception handling. I think I found the culprit library now. Seems to be some issue with an internal library from our company.

[com.mikepenz.aboutlibraries.plugin.util.DependencyCollector] getResolvedArtifacts 4 :: allModuleArtifacts
=> It crashes in xxx.xxxx:xxx-xx:2.5-SNAPSHOT;runtimeElements

from aboutlibraries.

mikepenz avatar mikepenz commented on May 30, 2024

I suppose the catch(throwable) won't protect in that case though.

Not sure what other good options there could be 🤔

We do filter some build variants. it could be something to add a filter for some dependencies at collection level.

from aboutlibraries.

Siedlerchr avatar Siedlerchr commented on May 30, 2024

No, actually build completes, that is fine, that goes through now. The exception handling helps to catch that stack overflow error and continues with the next one.

Even with your plugin:

2023-09-25T13:09:47.331+0200 [DEBUG] [com.mikepenz.aboutlibraries.plugin.util.DependencyCollector] getResolvedArtifacts 1 :: com.mikepenz:aboutlibraries:10.9.0-b02
2023-09-25T13:09:47.331+0200 [DEBUG] [com.mikepenz.aboutlibraries.plugin.util.DependencyCollector] getResolvedArtifacts 4 :: allModuleArtifacts
2023-09-25T13:09:47.340+0200 [INFO] [com.mikepenz.aboutlibraries.plugin.util.DependencyCollector] Found ambiguous variant - com.mikepenz:aboutlibraries:10.9.0-b02;releaseVariantReleaseRuntimePublication
	at org.gradle.api.internal.artifacts.PreResolvedResolvableArtifact.hashCode(PreResolvedResolvableArtifact.java:61)
	at org.gradle.api.internal.artifacts.DefaultResolvedDependency$ResolvedArtifactComparator.compare(DefaultResolvedDependency.java:225)
	at org.gradle.api.internal.artifacts.DefaultResolvedDependency$ResolvedArtifactComparator.compare(DefaultResolvedDependency.java:205)
	at java.base/java.util.TreeMap.compare(TreeMap.java:1570)
	at java.base/java.util.TreeMap.addEntryToEmptyMap(TreeMap.java:776)
	at java.base/java.util.TreeMap.put(TreeMap.java:785)
	at java.base/java.util.TreeMap.put(TreeMap.java:534)
	at java.base/java.util.TreeSet.add(TreeSet.java:255)
	at org.gradle.api.internal.artifacts.ivyservice.ArtifactCollectingVisitor.visitArtifact(ArtifactCollectingVisitor.java:47)
	at org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.ArtifactBackedResolvedVariant$SingleArtifactSet.visit(ArtifactBackedResolvedVariant.java:150)
	at org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.ParallelResolveArtifactSet$VisitingSet$StartVisitAction.visitResults(ParallelResolveArtifactSet.java:100)
	at org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.ParallelResolveArtifactSet$VisitingSet.visit(ParallelResolveArtifactSet.java:69)
	at org.gradle.api.internal.artifacts.DefaultResolvedDependency.sort(DefaultResolvedDependency.java:129)
	at org.gradle.api.internal.artifacts.DefaultResolvedDependency.getModuleArtifacts(DefaultResolvedDependency.java:107)
	at org.gradle.api.internal.artifacts.DefaultResolvedDependency.getAllModuleArtifacts(DefaultResolvedDependency.java:113)
	at org.gradle.api.internal.artifacts.DefaultResolvedDependency.getAllModuleArtifacts(DefaultResolvedDependency.java:115)
	at org.gradle.api.internal.artifacts.DefaultResolvedDependency.getAllModuleArtifacts(DefaultResolvedDependency.java:115)
	at org.gradle.api.internal.artifacts.DefaultResolvedDependency.getAllModuleArtifacts(DefaultResolvedDependency.java:115)

from aboutlibraries.

mikepenz avatar mikepenz commented on May 30, 2024

Ah thank you!

from aboutlibraries.

Siedlerchr avatar Siedlerchr commented on May 30, 2024

I stil wonder where this comes from or why gradle has issues there. Seems like it has troubles with getting the right variant.

from aboutlibraries.

mikepenz avatar mikepenz commented on May 30, 2024

Unfortunately that is something I don't have an answer to :/

from aboutlibraries.

mikepenz avatar mikepenz commented on May 30, 2024

Given the problem is unfortunately outside of the plugins capabilities. Closing. Please re-open if new details arise

from aboutlibraries.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.