rebar3_appup_plugin
rebar3_appup_plugin copied to clipboard
Option to generate simpler appups
From #13
The plugin can struggle to generate correct appups when there are complex supervision trees involved.
It might be nice to add the ability to specify a simpler appup generation algorithm for certain deps, where just loading all the modules and restarting the application would work fine.
For example, I encountered auto-generation failing when upgrading between this diff lpgauth/[email protected]
It ended up adding 8 generate_supervisor_child_instruction pairs for each of the dynamically generated children, but using the module name rather than their dynamic names. In this case an application restart would have been better.
In order to enable consistent appups for a dependency during a CI build, this would probably need to be configured in rebar.config somehow, for example:
{appup, [
{application_restart, [name_of_dep1, name_of_dep2]}
]}.
Or something better.
Would it work to use the mechanism described in #13 and override the statsderl dependency appup with a custom that does the restart?
Yeah definitely would work that way, just wondering if this might be a common case you want to handle directly. Alternatively, you might be able to detect this sort of supervision tree and improve the automatic generation.