Goose97

Goose97

WhyRecompile - Mix tasks to explore project files dependency graph

I’d like to introduce WhyRecompile, a library provides utilities to work with Elixir files dependency graph. This aims to complement the mix xref graph, helps you figure out questions like: Why file A and B recompiles when I edit file C?

Commands

Show all files with dependencies count

mix why_recompile list

-----------------------+-----------------------------+---------------------------------
 File path             | Number of recompile files   | Number of MAYBE recompile files
-----------------------+-----------------------------+---------------------------------
 lib/fixtures/D3.ex    | 2                           | 0
 lib/fixtures/B4.ex    | 2                           | 0
 lib/fixtures/B3.ex    | 2                           | 0
 lib/fixtures/D2.ex    | 1                           | 0
 lib/fixtures/B2.ex    | 1                           | 0
 lib/fixtures/B1.ex    | 1                           | 0
 lib/fixtures/A3.ex    | 1                           | 0
 lib/fixtures/A2.ex    | 1                           | 0
-----------------------+-----------------------------+----------------------------------

Show all dependencies of a single file

You can increase the verbosity level for more detailed information: the dependency chain, the code snippets that cause such dependency, …

mix why_recompile show lib/fixtures/D3.ex

lib/fixtures/D1.ex
lib/fixtures/D2.ex

I hope that others find it useful! Please feel free to post any comments/feedback here, or issues on GitHub.

https://github.com/Goose97/why-recompile

Where Next?

Popular in Announcing Top

tmbb
I’ve published the first version of my Makeup library. It’s a syntax highlighter for Elixir in the spirit of Pygments, Currently it highl...
New
tmbb
PhoenixWS - Websockets over Phoenix Channels Source code on Github here: GitHub - tmbb/phoenix_ws: Websockets implemented over Phoenix Ch...
New
mathieuprog
Hello :waving_hand: Allow me to introduce you to Tz, an alternative time zone database support to Tzdata. Why another library? First a...
New
jakub-zawislak
Hi everyone, I’m coming from the Symfony (PHP) framework. I like Phoenix, but it has a one thing that was build much better in the Symfo...
New
ostinelli
Let’s write a database! Well not really, but I think it’s a little sad that there doesn’t seem to be a simple in-memory distributed KV da...
New
nikokozak
Hello all, I’ve been working on Svonix - a library for quickly integrating Svelte components into Phoenix views. It’s a much-needed succ...
New
tmbb
I’ve decided to create this topic to discuss optimization possibilities for something like Phoenix LiveView. I’ve created this topic unde...
144 10462 141
New
kevinlang
Hey all, We have made an Ecto3 Adapter for SQLite3, ecto_sqlite3! We have successfully on-boarded the full suite of integration tests (...
New
mattludwigs
Grizzly is a library for working with Z-Wave devices. Z-Wave is a low-frequency radio protocol for controlling smart home devices on a me...
New
New

Other popular topics Top

New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement