2

I cloned an Erlang project that uses rebar3 and has several dependencies:

{folsom, ".*", {git, "git://github.com/basho/folsom.git", {branch, "master"}}},
{lager, {git, "https://github.com/basho/lager", {tag, "3.2.1"}}},
{erlcql, {git, "git://github.com/rpt/erlcql.git", {branch, "master"}}},
{mochiweb, "1.5.1*", {git, "git://github.com/basho/mochiweb", {branch, "master"}}}

But I suspect that some of these dependencies are not needed. How can I automatically verify which dependencies are actually used in the source code?

goncalotomas
  • 1,000
  • 1
  • 12
  • 29
  • Read the docs, search for module names maybe? I guess that is not 100% correct too. Maybe even remove the dependency, and compile and run project to see if anything does not work. Also, if there is tests, run them :) – vfsoraki May 06 '17 at 09:57
  • I gave a small example here but the point behind wanting an automated solution is to avoid having that work in bigger projects. I understand that for this particular example it seems simple and indeed I did something similar to what you've said to find out. It just doesn't scale... :) – goncalotomas May 06 '17 at 10:30

0 Answers0