summaryrefslogtreecommitdiff
path: root/src/rebar_plugins.erl
Commit message (Collapse)AuthorAgeFilesLines
* Optimize path handlingFred Hebert2018-10-111-1/+1
| | | | | | | | | | | | | | | | | - 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.
* Abstracted path managementFred Hebert2018-10-111-3/+1
| | | | | | | | | | | | | | | | 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.
* reset default profile app plugins to empty if at the top level (#1885)Tristan Sloughter2018-09-171-9/+24
| | | | | | | | | | | top level default profile plugins are installed in the run_aux function. This commit removes the plugins from the plugin opts of an application that is also at the top level and skips the default profile when installing top level plugins in project_apps_install so they aren't handled twice. Additionally, before handling a plugin the state's list of known plugin apps is checked and the plugin is skipped if it has already been handled.
* Work around OTP-21 deprecation of get_stacktrace()Fred Hebert2018-05-031-2/+2
| | | | Based off a macro by @okeuday at https://github.com/erlang/otp/pull/1783
* Fix Plugin path handling (again!)Fred Hebert2017-12-041-3/+5
| | | | | | | | | | | | | | | | | | | The path reloading of plugins had been fixed properly, but the problem is that the paths it was using to re-load only considered the current compile step, rather than the overall state of plugins. As such, the reloaded paths after plugin compilation only reloaded the *latest* plugin and not the other ones. This fix forces the addition of all built plugin paths to the code paths after a plugin compile job is run. This ensures that the path is clean for initial plugin deps (only add those that are required), and is re-made total after the fact (add all the plugins possible). This commit also includes a system tests suite that can be run optionally; the problem with this plugin mechanism was impossible to find through mocked dependencies, and a working counterexample was provided to us. The systest suite can be run against real projects without conflict to make sure no regressions are hit.
* fix code path when validating pluginsTristan Sloughter2017-12-031-1/+1
|
* add project_providers after initing default providers but allow overridesTristan Sloughter2016-02-221-4/+6
|
* give new opt project_plugins providers precedence over default providersTristan Sloughter2016-02-201-1/+10
|
* don't lose overrides in an app when installing plugins it uses'Tristan Sloughter2016-01-311-4/+14
|
* install project app plugins after discovering them not beforeTristan Sloughter2016-01-101-2/+10
|
* fix dialyzer warningsTristan Sloughter2015-09-091-1/+1
|
* remove state record from app_info recordTristan Sloughter2015-08-311-1/+2
|
* wip: move state into app_infoTristan Sloughter2015-08-311-11/+10
|
* remove unneeded packages ets table load/unload in pluginsTristan Sloughter2015-08-211-14/+8
|
* replace use of dict of packages and registry with single ets tableTristan Sloughter2015-08-211-2/+8
|
* keep plugins dir as deps dir when compiling plugins+depsTristan Sloughter2015-07-281-1/+2
|
* Minor refactorsFred Hebert2015-07-021-1/+1
|
* wip: deps install refactorFred Hebert2015-07-021-1/+1
|
* fix for overrides in plugins, simpler plugin state handlingTristan Sloughter2015-06-241-3/+1
|
* include app's state providers when building plugin so they can rely on pluginsTristan Sloughter2015-06-201-7/+7
|
* fix path storing for pluginsTristan Sloughter2015-06-191-4/+5
|
* plugins providerTristan Sloughter2015-06-181-19/+31
|
* set default providers before installing pluginsTristan Sloughter2015-05-311-4/+5
|
* add comment explaining installing each plugin individuallyTristan Sloughter2015-05-291-0/+1
|
* fix for plugin installation and code pathsTristan Sloughter2015-05-271-11/+31
|
* run hooks when building pluginsTristan Sloughter2015-05-211-1/+1
|
* install plugins from the global config to ~/.cache/pluginsTristan Sloughter2015-05-171-8/+16
|
* add all plugins, not those just built, to pathTristan Sloughter2015-05-091-2/+2
|
* only install dep plugins from install_depsTristan Sloughter2015-04-051-3/+1
|
* install each deps plugins after handling dep, instead of at the endTristan Sloughter2015-04-051-18/+18
|
* install dep plugins & run provider hooks the same as shell hooksTristan Sloughter2015-04-041-10/+17
|
* main module of a plugin just has to export init/1Tristan Sloughter2015-04-031-6/+3
|
* update project app list with new appinfo records after buildTristan Sloughter2015-02-191-8/+8
|
* update plugin install codeTristan Sloughter2014-12-241-2/+3
|
* include providers listed in plugins envTristan Sloughter2014-12-241-13/+19
|
* move dir functions from utils to new module rebar_dirTristan Sloughter2014-12-011-1/+1
|
* fixes for dialyzer findingsTristan Sloughter2014-11-301-0/+1
|
* global plugins install to global config directoryTristan Sloughter2014-11-291-4/+6
|
* fix lock provider to work anytime it is runTristan Sloughter2014-11-291-1/+1
|
* fix check for plugin being a providerTristan Sloughter2014-11-221-1/+1
|
* add plugin and its deps to path as they are builtTristan Sloughter2014-11-081-4/+6
|
* add commentTristan Sloughter2014-11-081-0/+1
|
* support base dir and properly reset deps_dir after plugin providerTristan Sloughter2014-11-081-1/+2
|
* warn on bad pluginTristan Sloughter2014-11-071-22/+49
|
* handle no plugins as [] list of pluginsTristan Sloughter2014-09-201-1/+1
|
* only compile invalid pluginsTristan Sloughter2014-09-201-1/+2
|
* move deps and plugins to _ prefixedTristan Sloughter2014-09-201-1/+1
|
* install plugins to plugins/Tristan Sloughter2014-09-201-3/+21
|
* install plugins to plugins/Tristan Sloughter2014-09-191-1/+8
|
* add do taskTristan Sloughter2014-09-181-0/+12