I’m working on a small library that, when use-ed in a client project, reads some external files and compiles those files into Elixir functions. The library has a __using__ macro which does the compilation of the external files during the compilation of the client project. My workflow is to work on the files of the library (there is mainly one file) and I do the compilation and tests in the client project that use-ses the library.
Today, I was working on small refactoring of the code and cleanups (in the library directory). I don’t know what I have done, but suddenly, the compilation of the client application started to take what seemed tens of minutes rather than few seconds; the direct compilation of the library is as fast as before. Yet, the client code is generated and works properly!
I make several tests:
- I commented out all modifications I had done. Same result
- I got back to the main branch of the library. Same result
- I cleaned every thing, including the deps, on library side and on client app side and reloaded the deps. Same result except that compilation of the external dependencies also took what seemed hours (I actually stopped it)!
- I copied (with
cp -R) the client application into a new directory. Same result - As I was getting a bit desperate, I created a new client project from scratch, copied what I needed from the old one and … it worked!
Yet I’m quite concerned as I still don’t understand what has happened. I tried to see what compiler options would emit information about where the compiler was stuck but found none.
Does anyone have a slightest idea of what could have happen and how to investigate such a problem?




















