-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Feature request: Add size and count of unique deps to Deno info #6468
Comments
Sure sounds like a useful nice feature. |
I wouldn't mind trying to tackle this. |
I noticed a todo left by @bartlomieju. They mention that the print_file_info function is a repeat of the whole compilation stack. One thing I am a bit confused by was the Deps in deno.core and ModuleGraph in deno.cli. They both seem to be generating a dependency graph, except Deps seems a bit more specialized to generating it for deno info. I was curious if it would be alright to try and turn this code into some traversals of the ModuleGraph or if I am missing something subtle here. I think this will do a few things:
Any feedback / insight would be appreciated. This is my first feature. |
@KrisChambers thanks for interest on working in this PR. Your diagnosis is right, however I don't have a straight answer for that. If you want to implement this feature, the best approach would be to annotate each entry in the tree with the length of the source code (that is already available on As for refactoring |
Thanks for the reply @bartlomieju. I agree, this is probably the most straight forward way to approach it using the I will leave |
Closed in #6786 |
Currently
deno info mod.ts
will produce a dependency tree ofmod.ts
. It would be a nice enhancement if next to each module the size in bytes could be shown in addition to the size of the sub-tree. This would help spot bloated dependencies.Another nice to have improvement would be a count of unique dependencies.
Possible output:
(byte numbers above are fictional, don't add up and are for illustrative purposes only)
The text was updated successfully, but these errors were encountered: