From fb67eb0ee95b2f03dc6c51535ab4b18ea70d315f Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Mon, 4 Dec 2017 09:34:52 -0500 Subject: Fix Plugin path handling (again!) 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. --- .../all_SUITE_data/resource_plugins/rebar.config | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 systest/all_SUITE_data/resource_plugins/rebar.config (limited to 'systest/all_SUITE_data') diff --git a/systest/all_SUITE_data/resource_plugins/rebar.config b/systest/all_SUITE_data/resource_plugins/rebar.config new file mode 100644 index 0000000..7baec1f --- /dev/null +++ b/systest/all_SUITE_data/resource_plugins/rebar.config @@ -0,0 +1,23 @@ +%% Sample provided by @tothlac +{plugins, [ + {rebar_tidy_deps, ".*", {git, "https://github.com/ferd/rebar3-tidy-deps-plugin.git"}}, + {rebar_alias, {git, "https://github.com/tsloughter/rebar_alias.git"}}, + rebar3_appup_plugin +]}. + +{deps, [ + {hackney, {git, "https://github.com/benoitc/hackney.git", {tag, "1.10.1"}}} + ]}. + + +%% Make work despite compat issues with strings and warnings +{overrides, [ + {override, rebar3_appup_plugin, [ + {erl_opts, [ + {platform_define, "^19", brutal_purge_fixed}, + {platform_define, "^2", brutal_purge_fixed}, + %% warnings_as_errors, + debug_info + ]} + ]} +]}. -- cgit v1.1