chore: replace dpdm with rev-dep (faster alternative for circular imports check)#8955
chore: replace dpdm with rev-dep (faster alternative for circular imports check)#8955jayu wants to merge 2 commits intoinvoke-ai:mainfrom
Conversation
|
The changes cause the build to produce errors. (a lot) |
|
I've fixed the issue with knip detecting rev-dep unused package/binary. I've successfully build the front-end app. |
Build Performance Comparison: dpdm vs rev-dep
Summary: rev-dep is marginally faster (~0.3s on full build), but the difference is negligible. Both tools correctly detect zero circular dependencies in the Note: The PR required two fixes to work correctly:
I dont know if this is the right thing with the config, so if you have any change that removes more time then i am happy to test again. |
|
It's strange that you get similar time for dpdm and rev-dep Here are my measurements (done with Run from
Integrating rev-dep config and replacing knip comes with changes to what those tools covers, rev-dep does not detect unused enum members, unused namespace types and exports, unused class members etc. So tools have some common features, but knip cannot be fully replaced with rev-dep. I can help with changing knip to rev-dep but maintainers needs to agree for that before I commit my time into it :) rev-dep is much faster than knip, we can expect similar difference like between dpdm and rev-dep from the table above. |
Summary
Hi! I would like to propose replacing library dpdm that is used to lint frontend codebase against circular dependencies with much faster alternative tool rev-dep
Circular check with rev-dep takes around 150ms (without pnpm overhead) while dpdm needs around 5s
Disclaimer: I'm rev-dep author
Related Issues / Discussions
Rev-dep is also an alternative tool to knip.dev which is also used in the project. Rev-dep offers much faster check times which is useful for both humans and AI agents.
I can help integrating other rev-dep checks into codebase / replacing knip.
Rev-dep is not 1:1 replacement for knip, but it covers most important checks - unused exports, missing / unused dependencies, orphan files, unresolved imports.
Rev-dep timing is around 150ms while knip checks takes 5s+ . Example config :
QA Instructions
CI must be green
Merge Plan
n/a
Checklist
What's Newcopy (if doing a release after this PR)