iurysza / module-graph

A Gradle Plugin for visualizing your project's structure, powered by mermaidjs
https://plugins.gradle.org/plugin/dev.iurysouza.modulegraph
MIT License
345 stars 13 forks source link

Doesn't work on Windows #51

Closed NinoDLC closed 2 months ago

NinoDLC commented 3 months ago
> Task :createModuleGraph FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':createModuleGraph'.
> Cannot access output property 'projectDirectory$modulegraph' of task ':createModuleGraph'. Accessing unreadable inputs or outputs is not supported. Declare the task as untracked by using Task.doNotTrackState(). For more information, please refer to https://docs.gradle.org/8.7/userguide/incremental_build.html#sec:disable-state-tracking in the Gradle documentation.
   > Failed to create MD5 hash for file content.

📱 Tech info

NinoDLC commented 3 months ago

A project as simple as this example won't work, giving the same error: https://github.com/NinoDLC/ModuleGraphDoesntWork

NinoDLC commented 3 months ago

Doesn't work on Windows but works on Mac and WSL

iurysza commented 3 months ago

Hey, thanks for the report. I'll take a look into it.

MAshhal commented 3 months ago
> Task :createModuleGraph FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':createModuleGraph'.
> Cannot access output property 'projectDirectory$modulegraph' of task ':createModuleGraph'. Accessing unreadable inputs or outputs is not supported. Declare the task as untrack
ed by using Task.doNotTrackState(). For more information, please refer to https://docs.gradle.org/8.7/userguide/incremental_build.html#sec:disable-state-tracking in the Gradle documentation.
   > Failed to create MD5 hash for file content.

Same happening for me

Workaround for now:

tasks.named("createModuleGraph") {
    doNotTrackState(reasonNotToTrackState = "https://github.com/iurysza/module-graph/issues/51")
}
iurysza commented 2 months ago

Couldn't get the root cause, so I used that approach to work around this issue.

Can you double check if v0.10.1 works for you @MAshhal and @NinoDLC? Thanks!