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.

Where Next?

Popular in Libraries Top

woutdp
Hi! I wanted to introduce my latest project LiveSvelte. It allows you to render Svelte inside LiveView with end-to-end reactivity. It’s ...
New
michalmuskala
Another small library today. PersistentEts Hex: persistent_ets | Hex GitHub: GitHub - michalmuskala/persistent_ets Ets table backed by...
New
Qqwy
Solution is a library to help you with working with ok/error-tuples in case and with-expressions by exposing special matching macros, as ...
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
ahamez
Hi everyone, I’ve been working on this protobuf library for 3 years. We use it in the company I work for, EasyMile, to communicate with ...
New
Eiji
ExApi is a library that I’m developing now and hope release soon This library will allow to: list all apis list all api implementation...
New
wmnnd
Hi there, for my project DBLSQD, I needed a file storage solution that is a bit more flexible than Arc. Because I thought others might f...
New
mtrudel
Bandit is an HTTP server for Plug and WebSock apps. Bandit is written entirely in Elixir and is built atop Thousand Island. It can serve...
New
maltoe
Hello! Came here to announce ChromicPDF, a pet project PDF generator I’ve been working on for the past few months. Why another PDF gener...
New
New

Other popular topics Top

sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 42633 214
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

Sub Categories:

We're in Beta

About us Mission Statement