feat(plugins): loadStatic accepts a companion dialog vtable for static builds#147
Open
facontidavide wants to merge 1 commit into
Open
feat(plugins): loadStatic accepts a companion dialog vtable for static builds#147facontidavide wants to merge 1 commit into
facontidavide wants to merge 1 commit into
Conversation
…c builds Static compositions cannot dlsym the dialog getter from a DSO, so DataSourceLibrary/MessageParserLibrary/ToolboxLibrary::loadStatic take the class-keyed dialog vtable directly and validate it like the dynamic path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Statically-composed applications (the PJ4 WebAssembly build links official plugins as static archives) cannot
dlsyma plugin's companion dialog getter from a DSO the way the dynamic loader does. This PR lets the application pass the class-keyed dialog vtable directly at registration time.What changed
DataSourceLibrary::loadStatic,MessageParserLibrary::loadStatic, andToolboxLibrary::loadStaticaccept an optionalconst PJ_dialog_vtable_t* dialog_vtable(defaultnullptr, fully backward compatible).resolveDialogVtable()then serves it to the host.dialog_plugin_base.hppexports the unique class-keyed getter used by static compositions.Consumer
PJ4
feat/wasm-reboot:PluginRuntimeCatalog::registerStaticPlugins(StaticPluginSet)passes these vtables through; the host side adds a registration-time fail-fast when a plugin advertisesHAS_DIALOGwithout a dialog vtable (host-side tests in PJ4'splugin_runtime_catalog_test).Release note
Per the versioning policy this is a backward-compatible API addition → MINOR bump warranted (0.17.0) when convenient (three synced sources:
conanfile.py,PJ_PACKAGE_VERSION,recipe.yaml). Not bumped in this PR; happy to add it here if preferred.🤖 Generated with Claude Code