0

I'm getting results from mix xref graph that, in some cases, seem to be empirically wrong.

e.g.

# lists 81 modules
mix xref graph --sink lib/some_module.ex --label compile --only-node

# recompiles 7 modules
touch lib/some_module.ex && mix compile --verbose

I've been spending a lot of time looking at the Mix.Tasks.Xref docs/source - am I misunderstanding something or is there a possibly a bug?

Context: I'm working with a pretty nasty compilation dependency graph for a very large Phoenix app (modifying a file often triggers 500+ additional recompiles). I'm trying to find/analyze paths that contain transitive compile-time dependencies and then identify the biggest bang-for-buck edges that I can snip to make the graph a lot less connected. Running on Elixir v1.12.

  • 1
    Hi! I'm not so familiar with mix xref myself, but it seems that Elixir 1.13 has added a `--label compile-connected` flag to do this: https://hexdocs.pm/mix/master/Mix.Tasks.Xref.html. You can try it out if you are using `asdf` with `asdf install elixir master`, maybe it can help? – sabiwara Aug 20 '21 at 22:50
  • I think we might need more details to really pull apart what is triggering the recompile – DogEatDog Aug 22 '21 at 14:07

0 Answers0