[erlang-questions] Erlang package manager

Tuncer Ayaz tuncer.ayaz@REDACTED
Wed Dec 17 21:56:33 CET 2014


On Wed, Dec 17, 2014 at 2:26 PM, Fred Hebert wrote:
> 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 reasonable results.
>
> 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 tweaking projects.

I guess I should have expanded in the section titled 'extra notes' in
[1], so here it goes.

The loader changes and .app extensions should go hand in hand. That
means, ERL_LIBS may very well contain multiple versions of an app
where the version constraint in the .app file is used to select the
right one to use as in releases. Of course, this is not as simple as
it sounds and might require further changes, but I think it's clear
that one instance of the VM shouldn't have to deal with simultaneously
using different versions of the same app. Therefore, I don't think
it's as complicated as it might seem at first.


[1] http://erlang.org/pipermail/erlang-questions/2014-December/082132.html



More information about the erlang-questions mailing list