I am trying to figure out how to download and compile my application’s dependencies, listed in a mix.lock file, without having a mix.exs file. Sort of like a requirements.txt in python.
I am building and packaging my Elixir application using Docker.
I have an umbrella app with 5 different mix.exs files. They tend to churn a lot, which busts my mix deps.get and dialyzer caches, which makes my builds go from 5 minutes to an hour.
If I could use my mix.lock file, which we can assume is up to date and contains all of my required dependencies, without having to import all of these different mix.exs files, it would be grand. I would be able to utilize the Docker cache in a much more efficient way.
If it’s part of his CI then it will be. I feel like we’re getting a bit off from the original point. Caching mix or PLT or whatever can be perfectly fine. Separating mix.exs from mix.lock isn’t gonna work, so I think it would be most productive to figure out what about caching the mix.exs is an issue.
Yeah, if it’s for CI I totally understand the need to cache the PLTs, but not why they need to be in the docker… Most CIaaS I’m aware of provide proper caching, just tell them to cache the PLTs and one is fine.
But you are righr, we are drifting away and I also think, that using mixlock without an actual mixfile isn’t possible. There isn’t even all information from the mixexs in the mixlock available.
If your mix file changes frequently the lock file will probably as well. If your lock file changes some PLTs needs to be rebuild. That’s just the way it works.