Precompiled packages?

Hi, what do you think about precompiled packages to speed up builds especially for ci build? Is there anything like this around?

The simplest I could think of would be to keep a branch with all the .beam files checked in, and use it for ci.

I dealt with something that might be similar: Using Github action cache - #4 by vrod

The idea is similar: it’s helpful to keep a copy of the compiled packages and dependencies.

1 Like

As far as I know there is no ready to use mix deps binary cache.

But by using Nix (also within CI) you could archive excellent caching behaviour.
Some tools exist to convert each mix.lock dependency to a own Nix build (for separate caching of each own dependency).

But the effort within our Elixir Nix community has declined to enhance this path.
Some tools only work with the former versions of mix.lock (the format once changed - mix.lock is not standardised).
The path forward would probably be, to work together with hex for providing a stable API for generating Nix builders of each dependency.?
As far as I know hex guys would support this (standardising mix.lock would be to limiting).

yes as @vrod notes this is I think better solved with caching at the CI level. This also ensures that any native dependencies work just fine too.

Thank you all so much! Now I have some things to try on Monday :slight_smile: