jraska / modules-graph-assert

Gradle plugin to keep your modules graph healthy and lean.

Home Page:https://plugins.gradle.org/plugin/com.jraska.module.graph.assertion

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: Print longest module path even when do not pass the max height

marcellogalhardo opened this issue · comments

Hi,

It would be nice to be able to get the longest path, exactly how it works today when a module has a height longer than the max height. This would be useful for feature teams to keep an eye in their longest path and avoid to reach the max height.

Maybe something like: ./gradlew checkGraphStatistics.

Other information could be handy, for instance the ones from modules.graph.print.statistics parameter.

Does it make sense from this project perspective? 🤔

Hi Marcello,

Thanks for the idea - I will think a bit about it, but I think it makes sense and should be simple.

One option could be just adding a longest path into the GraphStatistics and print it together with the modules.graph.print.statistics or do you think it would be better having a separate task printing the statistics only without the modules graph?

Hey @jraska !

Hm, I think you are right: it'd be helpful to have it in GraphStatistics and modules.graph.print.statistics, and this would already be enough to give visibility in the longest path. The graphviz text might pollute a little when you just want the statistics (e.g., generateModulesGraphvizText) but this isn't a big a problem.

Thanks for the quick reply!

Again thank you for raising it! :)

I actually think the modules.graph.print.statistics parameter could be deprecated in favor of the new gradle task - probably the name would be modulesGraphPrintStatististics.

In case someoen would like to have the same output as before the new way will be ./gradlew modulesGraphPrintStatististics generateModulesGraphvizText. I think it was a mistake before to add such conditional logic to something which is Graphviz, because the statistics have nothing to do with Graphviz.

Hey @marcellogalhardo, please check the release 1.4.0 and let me know if that works for you.

Also other idea from me is if you would like to save these statistics output into some format better readable by machines, I would be happy for PR ;)