ukashazia

ukashazia

Persistent Builds Issue: Dependencies Recompiling Every Time

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:

  • Set MIX_ENV to “dev” both locally and within the Docker container.
  • Checked my Elixir version (I’m using the latest stable version).
  • Cleaned the project using mix clean.
  • Verified the MIX_ENV variable 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?

Marked As Solved

ukashazia

ukashazia

Solved: i solved the issue by running mix clean then mix setup when starting to work on a project. I don’t know the reason or why it happened or how it gets fixed but it works for me :slight_smile:

Also Liked

dimitarvp

dimitarvp

When in doubt, always nuke the _build and deps directories from orbit first.

Last Post!

ukashazia

ukashazia

i thought you were replying to my comment :sweat_smile: sorry for the confusion

Where Next?

Popular in Questions Top

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
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
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
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

Other popular topics Top

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
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
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
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
kip
I’m a bit excited to announce that Localize and friends are now at release 1.0. Even though it’s a 1.0 release, it stands on 8 years of w...
New

We're in Beta

About us Mission Statement