Implement Element.configure_dependencies()
This is the main merge request to implement Element.configure_dependencies() as per the proposal to extend dependency attributes.
This patch goes a bit further to port all BuildStream internals and core elements to use the new Element.configure_dependencies(), and all usage of Element.search() is removed by this branch.
Main features of this branch in chronological order include:
-
Create
Element.configure_dependencies()- Includes documentation and preliminary testing
-
Break API in
ScriptElementsuch thatElement.search()is no longer needed (element names were being used here, now we use Element instances directly in theScriptElement.layout_add()API)-
Behavior is slightly changed, such that order of calls to
ScriptElement.layout_add()are no longer significant.This is because the old API would stage elements sequence, whereas the new behavior is the use the new
selectionarguments toElement.stage_dependency_artifacts()andElement.dependencies(), so that we do not traverse common dependencies more than once (this should also make theScriptElementmore performant whenever staging multiple artifacts with common dependencies).
-
-
Update
scriptelement to now expose dependency configurations in place of element names in the element'sconfigsection.- Includes documentation updates and test updates in the integration tests
-
Add new feature to
BuildElementto also allow staging of dependencies into exotic new locations with a newlocationdependency configuration.- Includes additional cache key test and additional integration test
-
Add
OverlapCollector(private API) andOverlapAction(public API)-
The
OverlapActionis a new parameter toElement.stage_artifact()andElement.stage_dependency_artifacts()and allows the caller to decide the behavior when overlaps occur due to multiple distinct invocations of these staging functions. -
Consequently, it is now illegal to call the staging APIs outside of
Element.stage()implementations (except for where the core calls these internally for the purposes of opening workspaces or checking out artifacts).
-
For the API breaks, these are addressed in bst-plugins-experimental with this merge request.