dependency-analysis-gradle-plugin: `Node :a is not in the graph` error

Build scan link

Plugin version

0.72.0

Gradle version

7.0

Android Gradle Plugin (AGP) version

4.1.3

Describe the bug

Running buildHealth fails error.

Execution failed for task ':template:measureProject'.
> Node :schufa is not in the graph

template module doesnt depend on schufa. templete and schufa modules are only used in app module.

To Reproduce Steps to reproduce the behavior:

  1. … I have no idea how to reproduce.

Expected behavior

0.72 should work as 0.71.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':template:measureProject'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:187)
        at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:268)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:185)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:173)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
        ...
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: java.lang.IllegalArgumentException: Node :schufa is not in the graph
        at com.autonomousapps.graph.DependencyGraphKt.missingNode(DependencyGraph.kt:203)
        at com.autonomousapps.graph.DependencyGraph.adj(DependencyGraph.kt:98)
        at com.autonomousapps.graph.DependencyGraph.adj(DependencyGraph.kt:89)
        at com.autonomousapps.graph.DepthFirstSearch.dfs(DepthFirstSearch.kt:19)
        at com.autonomousapps.graph.DepthFirstSearch.<init>(DepthFirstSearch.kt:14)
        at com.autonomousapps.graph.DepthFirstSearch.<init>(DepthFirstSearch.kt:9)
        at com.autonomousapps.graph.DependencyGraph.subgraph(DependencyGraph.kt:135)
        at com.autonomousapps.graph.DependencyGraph.removeEdges(DependencyGraph.kt:170)
        at com.autonomousapps.tasks.ProjectMetricsTask$expectedResultGraph$2.invoke(ProjectMetricsTask.kt:79)
        at com.autonomousapps.tasks.ProjectMetricsTask$expectedResultGraph$2.invoke(ProjectMetricsTask.kt:24)
        at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
        at com.autonomousapps.tasks.ProjectMetricsTask.getExpectedResultGraph(ProjectMetricsTask.kt)
        at com.autonomousapps.tasks.ProjectMetricsTask.action(ProjectMetricsTask.kt:60)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
        ...
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (9 by maintainers)

Most upvoted comments

“When it’s ready.”

On March 21, 2022, GitHub @.***> wrote:

Yes.

Happy to report that v1.0.0-rc03 fixes our issue. Thank you!  Any ETA on the 1.0.0 release?

— Reply to this email directly, view it on GitHub <https://github.com/autonomousapps/dependency-analysis-android-gradle- plugin/issues/386#issuecomment-1073681852>, or unsubscribe <https://github.com/notifications/unsubscribe- auth/ABJG5PMWYDI3DPVDAHQFRKDVBA7GHANCNFSM43VMC2OA>. Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification- email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification- email%26utm_medium%3Demail%26utm_source%3Dgithub>. You are receiving this because you modified the open/close state.Message ID: <autonomousapps/dependency-analysis-android-gradle- @.***>

So I found a really fun bug, that has been around for a long time, but is only visible because of the recent change that had strict input validation. I think/hope it resolves this issue. Thank you again for reporting and providing the build scans. Would have been very hard to diagnose without that.