summaryrefslogtreecommitdiff
path: root/src/rebar_paths.erl
Commit message (Collapse)AuthorAgeFilesLines
* Review comments addressedFred Hebert2018-12-011-1/+3
|
* Clear app details cache before checking in pathsFred Hebert2018-11-291-3/+4
| | | | | | | | | | | | | | | | | | The app data, when set by `rebar3_app_discover` basically does not include the modules if it was derived from the .app.src file, even if at a later point the modules were compiled. Since there is currently no clear way to add that information reliably across all compiler versions in all types of compilers, we simply clear the cache and re-derive the information when required. This might have a small performance cost, but is required for correctness whenever an application's first build is run. Specifically, this bug was detected when a plugin included lager's parse transform, and the application itself also required it, but two distinct versions were needed. This patch finalizes fixing this issue.
* Drop outdated commentsFred Hebert2018-10-141-2/+0
|
* Optimize path handlingFred Hebert2018-10-111-30/+29
| | | | | | | | | | | | | | | | | - Only set paths that need to be put as a priority - Clean up paths before leaving API mode The first point accounted for some performance cost, but the latter one explains the 40% overhead in test runs: since rebar3 calls rebar3 a lot with a bunch of fake apps, and that the new mechanism for path handling by default does not _remove_ paths, it just _orders_ them, we would end up in a situation where as the tests ran, more and more fake paths would get added to the VM. By the time the run was over, all path handling would take longer since more paths needed filtering every time. By resetting paths at the end of an API run, we prevent a given 'project' from polluting another one's runtime and performance once the API successfully returns.
* Clean path code, add tests, add clash detectionFred Hebert2018-10-111-6/+41
| | | | Some finishing touch to that code
* Fix a bug in compiler path handlingFred Hebert2018-10-111-7/+6
| | | | Also handle some formatting
* Abstracted path managementFred Hebert2018-10-111-0/+177
Move path management out of rebar_utils manual code path function handling (which we leave there for backwards compat), and centralize them to allow easier coordination of paths between plugins and deps. On top of path handling, do a check of loaded modules to only purge and reload those that actually need it done in order to prevent all kinds of weird interaction and accidental purge kills. It also allows the possible cohabitation of both at once, with a "in case of conflict pick X" as a policy Changing path handling in providers also highlighted a bunch of bugs in some tests and appears to fix some in other providers, specifically around plugins.