[go: up one dir, main page]

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

Module manager changes #890

Merged
merged 17 commits into from
May 16, 2021

Conversation

Paul-Licameli
Copy link
Collaborator

Various things cherry-picked out of my big misc-modules branch, related to the Module Manager.

Among these:

enabling loading of modules that depend on other modules, without any explicit description of those dependencies;

un-cluttering the simple protocol of symbols exposed by the modules, by eliminating special script pipe and track panel hijack hooks (alternative means can be found now for such things);

remove link dependency of ModuleManager on the GUI-heavy ModulePrefs page that interacts with it;

make it possible for plug-in providers to be just another kind of module, so that built-in or non-built-in ones will not need to be implemented differently.

@Paul-Licameli
Copy link
Collaborator Author

Rebased, fixed build problems (I was relying on precompiled headers before), force pushed

Copy link
Contributor
@lllucius lllucius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Built just fine on Windows (64-bit Debug build). Had to manually create the “bin/Debug/Modules” directory and copy mod-script-pipe into it before Audacity found it, but it did and it enabled just fine.

It build fine on Linux as well and mod-script-pipe works fine.

... Forcing appropriate failure to load modules with unsatisfied symbols on all
platforms.
... Repeatedly pass through the list of modules that need to be opened, so
long as the list is not empty and at least one module loaded in the last pass.

This discovers dependencies of modules on other modules, avoiding the need to
describe the dependencies and make one pass in some topologically sorted order.

Which would be smarter, but would require much other work.
... The standard module dispatch can do that.
... It ended up not used, and long ago superseded by other TrackPanel
reorganization.

Such things as that (and many more) will be implemented with different
idioms (registries in various higher level code) without requiring changes in
this low level protocol for loading modules.
... Forcing other places that use RegisterBuiltinModule to be more explicit
about their link dependencies on ModuleManager, with a new #include directive.

Does this make scripts/graph.pl show a new dependency cycle?  Happily no.  But
now we know.
... So that the plugin providers might themselves become modules, and so that
putting built-in commands and effects into modules will work
... All is set up so that plug-in providers can be modules that register
their instance-creating function pointers directly with RegisterProvider; no
special symbol name needs to be exported.

That is, they now just need to export ModuleDispatch and GetVersionString, just
like other modules for other purposes.

Duplication of logic from ModuleManager::InitializeBuiltins() is removed.

No examples yet in the previous commits, but it does work in my misc-modules
branch.
@Paul-Licameli Paul-Licameli marked this pull request as ready for review May 16, 2021 11:06
@Paul-Licameli Paul-Licameli merged commit b5958ff into audacity:master May 16, 2021
@Paul-Licameli Paul-Licameli deleted the module-manager-changes branch May 16, 2021 11:07
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

Successfully merging this pull request may close these issues.

2 participants