Ease configuring and running the builtin plugins. #1532
Merged
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.
This PR allows a user to run a builtin plugin via the
transformers:
orgenerators:
field without needing to also make the.so
file for said plugin available.The PR also makes it possible to run a builtin plugin without specifying the
--enable_alpha_plugins
flag.The gist of this PR is to exploit the statically linked factory functions already being created by the pluginator code generator. The PR moves a few interfaces around to avoid package cycles, and adds an enum type for the builtins, and a map associating the enums to the static plugin factory functions.
I had to modify the
pluginator
, the code generator that provides statically compiled factory methods for making plugins, to return interface types rather than concrete instances so that the factory methods could be invoked from generic code detecting the use of builtin plugins.Fix #1504
Fix #1508