Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to generate the graph only for selected module #5

Closed
mkutlev opened this issue Sep 21, 2021 · 2 comments
Closed

Add option to generate the graph only for selected module #5

mkutlev opened this issue Sep 21, 2021 · 2 comments

Comments

@mkutlev
Copy link

mkutlev commented Sep 21, 2021

For projects with many modules and not well organized dependencies the generated image is hard to understand. It has a lot of arrows.

To be able to analyze and improve one module add a way to generate image only for the module and its dependencies.

Example
I want to generate graph image for login module. I would like to be able to do something like:
- ./gradlew :features:login:graphModules
- ./gradlew graphModules -Pmodule=:features:login

@mkutlev
Copy link
Author

mkutlev commented Sep 21, 2021

@savvasdalkitsis I just tried the new version. When I add the module to filter I see only its direct dependencies. It would be nice to be able to see the whole tree.

Example:

app
+--- :libraries:network:core
|    +--- :libraries:inject:core 
|    |    +--- :tracking
|    +--- :libraries:session
+--- :presentation:common

With the latest version when I use -PgraphFilter=libraries:network:core I would see only this:

:libraries:network:core
+--- :libraries:inject:core
+--- :libraries:session

I would expect this:

:libraries:network:core
+--- :libraries:inject:core 
|    +--- :tracking
+--- :libraries:session

@savvasdalkitsis
Copy link
Owner

Hm yea i see your point. that is definitely doable but will take a bit of time to implement as i would have to generate the dep tree in memory myself so i can trim the nodes that are irrelevant. The current implementation lets graphviz handle the tree and all the plugin does is list all node relationships.

On the other hand, the fact that a dependency has another transient dependency shouldn't have a big effect on trying to isolate a module since, unless the transient dependency is marked as api, it should have no effect at compile time.

If it is marked as api then it will definitely be useful to have the whole tree.

I will spend some time later this week to see if i can add this as an option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants