Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Plugin path handling (again!) #1681

Merged
merged 1 commit into from
Dec 4, 2017
Merged

Conversation

ferd
Copy link
Collaborator

@ferd ferd commented Dec 4, 2017

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.

Fixes #1673

@ferd ferd requested a review from tsloughter December 4, 2017 14:42
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.
@ferd ferd force-pushed the fix-plugin-paths-again branch from 3d0f924 to fb67eb0 Compare December 4, 2017 14:45
@tsloughter
Copy link
Collaborator

We can also resurrect https://github.com/tsloughter/rebar3_tests

@ferd
Copy link
Collaborator Author

ferd commented Dec 4, 2017

I'd be up for that, though it'd be interesting to have it within the rebar3 repo so we don't lose it. We just need it to be excluded from the regular test path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rebar3 crashes in get-deps after compile on a plugin adding custom resources was executed
2 participants