-
Notifications
You must be signed in to change notification settings - Fork 23
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
Strengthening the corresponding of supervisor #2
base: master
Are you sure you want to change the base?
Conversation
@@ -206,15 +206,15 @@ generate_instruction(deleted, File) -> | |||
|
|||
generate_instruction(changed, ModDeps, {File, _}) -> | |||
{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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this we'll lose the ability to generate appup instructions for other behaviours
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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}
end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are you referring to as a supecial process?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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]r
andbehavi[ou]r
. (1)(1)
(2)