diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2017-08-05 10:35:51 -0400 |
---|---|---|
committer | Fred Hebert <mononcqc@ferd.ca> | 2017-08-05 11:04:58 -0400 |
commit | 1c96de5e10bd51ba4da9a89c087c191a8c7cd8c5 (patch) | |
tree | 9f1dac55ec397b030eefe45b7d97f82f7b96161c /src/rebar_prv_bare_compile.erl | |
parent | 330baef58fa02c8cddc31c5c373fc5bda30f11dd (diff) |
Allow top-level apps to take precedence over deps
The use case has been described in issue #1478 where a local application
can exist while being declared as a dependency as well. This allows, for
example, to work on a release where all applications may require to be
published independently, or to provide some form of 'vendoring' with a
local app.
The fix is done by decoupling the dependency source resolution form the
dependency parsing. The reason for this being that the discovery phase
needs to parse apps for their top-level deps, and dep installation needs
to resolve the packages with accuracy. In the current implementation,
both code paths call to the same function.
This patch splits up the precise discovery and makes it happen *only*
when installing dependencies, and only if a top-level app does not
already define the application needing resolving.
One weakness of this fix is that it necessarily breaks cycle detection
in dependencies that involve a root application depending on itself
since its own version as a dep will not be expanded. There appears to be
no possible way to prevent this, but should be rare enough to be worth
the tradeoff for the common case.
Diffstat (limited to 'src/rebar_prv_bare_compile.erl')
0 files changed, 0 insertions, 0 deletions