Strengthening the corresponding of supervisor - #2
Conversation
| {ok, {Name, List}} = beam_lib:chunks(File, [attributes, exports]), | ||
| Behavior = get_behavior(List), | ||
| Supervisor = is_supervisor(List), | ||
| CodeChange = is_code_change(List), |
There was a problem hiding this comment.
With this we'll lose the ability to generate appup instructions for other behaviours
There was a problem hiding this comment.
In other behaviour, I think that there is nothing that it need to generate a special instruction.
As an exception, supecial process and supervisor behaviour will be able to co-exist.
(However, supecial process does not require a behaviour.)
Still do you want a change, such as the following?
generate_instruction_advanced(Name, Behaviours, _, Deps) ->
case lists:member(supervisor, Behaviours) of
true -> {update, Name, supervisor};
false -> {load_module, Name, Deps}
endThere was a problem hiding this comment.
What are you referring to as a supecial process?
There was a problem hiding this comment.
If a module export system_code_change or code_change, it shoud have instruction that is {update, Module, {advanced, Extra}}. See also
However, it is not related to behaviour. (it related to is_code_change/1)
Modules except these and supervisor want add_module or delete_module, load_module.
|
Thanks for the PR, i've added some notes on 9f2e697 |
|
Thank you for the quick response !! |
behavi[o]randbehavi[ou]r. (1)(1)
(2)