Skip to content
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

Improve MetadataForm module registration #1761

Open
petrkalos opened this issue Feb 10, 2025 · 0 comments
Open

Improve MetadataForm module registration #1761

petrkalos opened this issue Feb 10, 2025 · 0 comments

Comments

@petrkalos
Copy link
Contributor

Current implementation of MetadatForms module is breaking data.all's code architecture by making an optional module (metadata_forms) being a dependency of core modules which shouldn't be possible but is being enforced by introducing a call proxy (metadata_manager). Instead the problem can be solved in the two following ways

  1. MF are enabled per module with a feature flag. Then initializer of each module is responsible for conditionally registering to MF. This approach would still spread MF.register() across the project
  2. MF are still enabled globally but during initialization of the module we iterate over all the modules/classes/models we want to enforce MF. The caveat is that MF module should be loaded after all the modules we want to enforce MFs. To avoid enabling a disabled module we must first check if it's enabled and then define it as a dependency.

Originally posted by @petrkalos in #1730 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant