lrascao/rebar3_appup_plugin

The new child does not start if a release is upgraded.

Closed this issue · 7 comments

I add a new child under a supervisor process, the new module is added, but the child process does not start.
The spec in the supervisor is:

init([]) ->
    AServer = #{
                   id => a_server,
                   start => {a_server, start_link, []}
                   },
    BServer = #{
                   id => b_server,
                   start => {b_server, start_link, []}
                    },
    {ok, {{one_for_all, 10, 10}, [AServer, BServer]}}.

The b_server module is the new added module.
The children are:

supervisor:which_children(server_demo_sup).
[{b_server,undefined,worker,[b_server]},
 {a_server,<0.413.0>,worker,[a_server]}]

The b_server does not start, and its pid is undefined.
Is it the correct? Or do I miss something?

can you post a debug output? (by defining DEBUG=1 on the shell invocation, eg. DEBUG=1 rebar3 appup generate)

yeah, that's probably it, does it work if you use other args than maps instead?

Yes, the old style works.

cool, not sure when i'll have the time to get around to this, would you be willing to add this feature in a PR?

I will take a look at it.

👍 thanks!