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

Show external packages #8

Open
lukepighetti opened this issue Apr 16, 2022 · 7 comments
Open

Show external packages #8

lukepighetti opened this issue Apr 16, 2022 · 7 comments

Comments

@lukepighetti
Copy link

Would be nice if lakos had an option to also quantify which files/projects are importing external dependencies

@OlegAlexander
Copy link
Owner

That feature is out of scope for lakos. For external dependencies, please try dart pub deps or the pubviz package.

@lukepighetti
Copy link
Author

Do you happen to know of any tools that allow us to see which files are importing which external packages?

@OlegAlexander
Copy link
Owner

Hi @lukepighetti, lakos parses all imports in the getEgdes function, but then I filter out the external imports on this line. You can try commenting out that line and see if that does what you want.

The reason I keep only the internal imports is that external imports make the graph ugly and also should not be counted in the metrics. Maybe in the future, I'll consider keeping external imports but marking them in a different color and not counting them in the metrics.

@lukepighetti
Copy link
Author

lukepighetti commented Apr 17, 2022

Seems like a feature that would be easy to add with a CLI flag. I'm pulling the data into a pandas dataframe anyway, and building my own graphs.

@OlegAlexander
Copy link
Owner

Hi @lukepighetti, to clarify, you want to show just top-level external imports, without recursively following all external imports, and without counting external files in the metrics. Is this correct?

@lukepighetti
Copy link
Author

lukepighetti commented Apr 18, 2022

If a file is a node, some metadata on the node that states which external packages it imported would be fine. Or it could be blended into the graph somehow, but I'm not sure what that would look like.

@OlegAlexander
Copy link
Owner

That sounds doable 😊 I'll consider adding that to the json output in the next release. If I were to graph it, the external files would be floating outside the project directory structure--I can try it and see if I can make it work visually.

@OlegAlexander OlegAlexander reopened this Apr 18, 2022
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