I’m currently working on an Elixir project using Visual Studio Code (VSCode) as my development environment. Unfortunately, I’ve encountered an issue with persistent builds and dependency compilation.
When I run
mix commands in my project, it seems that Elixir recompiles all the dependencies every single time, making the development process slower than expected. However, I noticed that when I develop the same project within a Docker container, the dependencies are compiled only once, and subsequent
mix commands are significantly faster.
I’ve already tried enabling persistent builds by setting the
MIX_ENV environment variable to “dev” and running
mix compile --persistent, but this doesn’t seem to resolve the issue.
Here’s what I’ve done so far:
MIX_ENVto “dev” both locally and within the Docker container.
- Checked my Elixir version (I’m using the latest stable version).
- Cleaned the project using
- Verified the
MIX_ENVvariable to ensure it is correctly set.
Unfortunately, none of these actions have made a difference, and I’m still facing the same problem. It’s puzzling that the behavior is different between my local environment and the Docker container.
Has anyone else experienced a similar issue with Elixir dependencies recompiling every time? I’d greatly appreciate any insights, suggestions, or tips on how to resolve this situation. Perhaps I’m missing something essential or there’s a configuration I need to adjust?