[erlang-questions] Erlang package manager
Wed Dec 17 14:26:29 CET 2014
For ERL_LIBS the distinction is that the paths are dynamically added at
strat time (unless you used a release's boot file that set the paths for
you). In ERL_LIBS, Erlang will automatically pick the newest version of
any library it sees and load that as a path.
Older copies are more or less just sitting there, not used.
So using a mechanism where you set all libs in a kind of global
directory forces you to either always use the bleeding edge (no matter
which Erlang version it was compiled for), or to adapt your paths in
every single one of your commands (erl, dialyzer, ct_run, typer, ...) to
use a consistent set of `-pa's and `-pz's in order to give you
I can't help but feel I'd just have an easier time using deps local to
each project, specifically since I can go and edit them if I feel like
For what it's worth, rebar3 introduces a '_checkouts' directory where
you can symlink stuff that would usually be in `_build/lib` (where deps
live) so that they get recompiled all the time if you end up working and
editing them and avoids crushing them by treating them as static
dependencies, whereas the other deps just get ignored after they've been
compiled once. See https://github.com/rebar/rebar3/blob/2ba2002a80e29aaf6b295ad8cf4856c4a142920b/doc/guide.md#checkout-dependencies
On 12/17, Vlad Dumitrescu wrote:
> On Wed, Dec 17, 2014 at 9:49 AM, Loïc Hoguin <> wrote:
> > I am not even sure how -pa or ERL_LIBS work when you have both app-1 and
> > app-2 in your lib directory. Which one does it choose? Will it choose the
> > right version when I want to start a shell for experimenting? I have not
> > seen anything that allows me to choose what version to run outside of
> > making a release/upgrade.
> The code path is searched in order, that's why we have both -pa and -pz. Of
> course, when a module has been loaded, even if the code path changes
> afterwards, it is not reloaded automatically.
> erlang-questions mailing list
More information about the erlang-questions