itdepends icon indicating copy to clipboard operation
itdepends copied to clipboard

Compute how much of dependency is used

Open brodieG opened this issue 5 years ago • 0 comments

Maybe percent of lines or functions. One computationally expensive but maybe close to doable way to do this is to compute the coverage of the dependency when running the tests of the package proper. Dependency could be taken to mean the direct dependency, or the dependency + its dependencies (easier said than done).

This is one way to try to automatically assess whether the heaviness of a dependency is justified.

I am not sure it's worth the effort to do this. Normally I offer to provide PRs when I submit FRs, but I don't think it's worth my time to do this. It might be worth your time under the assumption that it will be a lot easier for you to do this than me, and obviously that you find this interesting. Just throwing it out there on the off chance you find it interesting enough to contemplate.

brodieG avatar May 30 '19 15:05 brodieG