Skip to content

Keep plugins' registered functions associated with the plugins #2584

Open
@joaquimrocha

Description

@joaquimrocha

Is your feature request related to a problem? Please describe the impact that the lack of the feature requested is creating.

Currently we are storing some of plugins' registered functions in Redux. This is not recommendable since functions are not easily serialized, and we may have some problems related to performance because of this.
Related to this, we also have currently a hard time understanding which plugins have registered what.

Describe the solution you'd like

I think we can bypass this by: storing (in Redux) that a plugin A has that method to be run, and keep the method in that plugin or a related object.

This is more easily done with class-based plugins (methods are called from within a plugin) than the module based ones (functions are called "loosely" in modules). But maybe we can load the modules' code in a way that we override their used functions so we override them with a version that builds a class internally with the name coming from the module/package.json.

What users will benefit from this feature?

This should simplify our plugin mechanism, allow for a better developer experience (e.g. we could show exactly which plugins are failing to run which functions), as well as security (by having a more direct way to understand what plugins registered what functionality).

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.plugins

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions