facebook / buck

A fast build system that encourages the creation of small, reusable modules over a variety of platforms and languages.
https://buck.build
Apache License 2.0
8.56k stars 1.16k forks source link

How to remove unused dependencies? #2606

Closed hiraditya closed 3 years ago

hiraditya commented 3 years ago

Does buck report unused dependencies? This situation arises when I remove an import from source file, and there may be unused dependencies. If there is already a feature like this then please let me know. Thanks,

KapJI commented 3 years ago

You can check if buck autodeps can detect these unused dependencies.

hiraditya commented 3 years ago

can you share an example on how to use buck autodeps? I couldn't find in the documentation.

KapJI commented 3 years ago

Actually buck autodeps should generate Java dependencies for Buck itself. And you question is relevant to https://github.com/facebook/buck/issues/1634

KapJI commented 3 years ago

So unfortunately, right now we don't have such tools.