This patch modifies rebar_core to allow plugins to participate in the
pre and post processing steps, giving plugin authors more flexibility
The t_plugins ReTest is going to fail because we haven't integrated #123 yet. I don't think there's any bug introduced though, because I merge them in a local branch and all the integration tests are fine.
A good example of how useful this feature is can be found here.
Allow plugins to participate in pre and post processing
+1. @dizzyd, @joewilliams?
Does it allow to run a user plugin before system plugins?
No. It allows plugins to participate in the special pre/post processing hooks that rebar uses in turn to (a) preprocess: determine whether there are any directories that need to be processed before the current one and (b) postprocess: clean up after the all the modules handling the current command have completed.
If you take a look at my example code, you'll see that it gives a plugin the opportunity to customise the runtime environment in order to work around difficult problems (like processing non-erlang code). This is the exact use-case for plugins - to do things that rebar doesn't want to do itself (because they're outside it's remit, or whatever other reason).