Extensions runtime override can create re-basing issue
As mentioned in this reply on discourse.gnome.org, runtime override can cause re-basing issues and undermine GNOME Shell's extension management system:
- extension A monkey-patches a shell method
- extension B monkey-patches the same shell method
- extension A undoes its monkey-patching at runtime (the method is now the original)
- extension B is disabled, undoes its monkey-patching (the method has the modifications from A again)
At that point, both extensions consider the method unmodified, because each one undid its own monkey-patching. Yet in reality, the original method has been replaced irrevocably until the next login.
As recommended by @fmuellner, this issue can be solved by disallowing override after enable()
in ego reviews. It means:
Overriding GNOME Shell source MUST be done at enable()
only, which means extensions cannot override during runtime.
Adding this rule to ego review guidelines can cause some issues:
- It can create some complications for extensions offering settings. They cannot only apply the override when the option needs to be applied. They have to check the settings inside the overridden methods instead.
- We need to review all newly submitted extensions from the start.
- Reviewing process will be hard for extensions with large code base since we shouldn't only check for
prototype
in the code. - Tracing the override is hard for complex extensions.