summaryrefslogtreecommitdiff
path: root/src/buildstream/_pluginfactory/pluginoriginjunction.py
Commit message (Collapse)AuthorAgeFilesLines
* Refactor: Lazily instantiate ProvenanceInformation objectstristan/lazy-provenanceTristan van Berkom2020-10-011-3/+3
| | | | | | | | | | | | | As a rule, throughout the codebase we should not be using internal ProvenanceInformation objects in our APIs, but rather Node objects. This is because ProvenanceInformation is generated on the fly from a Node object, and it is needlessly expensive to instantiate one before it is absolutely needed. This patch unilaterally fixes the codebase to pass `provenance_node` Node objects around as arguments rather than `provenance` ProvenanceInformation objects.
* _pluginfactory: Make list_plugins() report new display informationTristan van Berkom2020-08-101-2/+7
| | | | | | | | Now the PluginFactory.list_plugins() API also reports a human readable explanation of where the plugin was loaded from for each plugin. This is internally supported by an extension of the abstract PluginOrigin.get_plugin_paths() APIs.
* _project.py: Only one set of plugin factoriesTristan van Berkom2020-08-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit makes it mandatory to specify the `plugins` configuration directly in the `project.conf`, and at the same time removes any ambiguity as to which plugins are loaded and how. It thus becomes impossible for the first pass to load the same plugins differently than in the second pass. Additionally, some additional project.conf keys are asserted to be specified in the toplevel project.conf and not included as a matter of policy and consistency. Summary of changes: * _project.py - Only one set of plugin factories, loaded only in the first pass. - Assert the following keys are only specified in project.conf and not included from other files: name, element-path, min-version, plugins - The create_element() and create_source() methods no longer need to take a `first_pass` argument * element.py: Updated to not specify `first_pass` to create_element() or create_source() * _frontend/widget.py: Print the only set of plugins which are loaded, no more ambiguity about first or second pass. * _pluginfactory/pluginoriginjunction.py: Chain load plugins from the single element/source factory, instead of accessing the Project.config member which no longer has the factories.
* _loader/loader.py: Make provenance a positional argumentTristan van Berkom2020-06-101-1/+1
| | | | | | This forces the `provenance` to `Loader.get_loader()` to be a mandatory argument, ensuring that there are never any callers which fail to provide provenance.
* _pluginfactory/pluginoriginjunction.py: Call get_loader() with provenance.Tristan van Berkom2020-06-081-1/+1
| | | | | This is important for reporting errors due to missing files while loading a junction.
* _pluginfactory/pluginoriginjunction.py: Add support for junction plugin origin.Tristan van Berkom2020-05-281-0/+83