apache / apache/buildstream

Add abstract dependencies

Open
#777 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
140
Forks
45
Avg merge
1d 3h
Merged PRs (30d)
6

Description

[See original issue on GitLab](https://gitlab.com/BuildStream/buildstream/-/issues/777)
In GitLab by [[Gitlab user @chiaratolentino]](https://gitlab.com/chiaratolentino) on Nov 22, 2018, 14:27

## Background

[//]: # (Provide a background or the root/source that justifies this task or action.)
As part of https://gitlab.com/BuildStream/buildstream/issues/776, we must introduce the concept of 'abstract dependencies' to allow test elements to be added into the build plan of a given element without necessarily consuming the output of the test elements.

## Task description

[//]: # (Short summary of the action to be executed)

For more detail, see the 'Create a new kind of dependency' section in the [full proposal from the mailing list](https://mail.gnome.org/archives/buildstream-list/2018-November/msg00038.html)

* [ ] When an element A specifies a condition-requirement on element B, calculate element A's 'abstract' dependencies from the condition-providers of element B and element B's 'normal' dependencies (see the figure under part 2 in the mailing list proposal)
* [ ] Add functionality to ```Element.dependencies()``` to optionally include abstract dependencies
* [ ] Include abstract dependencies in calculation of the cache key
* [ ] Include abstract dependencies in calculation of the build plan
* [ ] Don't include abstract dependencies in staging dependency artifacts

## Acceptance Criteria

[//]: # (Acceptance criteria should follow the S.M.A.R.T. principle https://en.wikipedia.org/wiki/SMART_criteria )

Abstract dependencies are introduced such that they:

1.) do not care about the output of the element that is 'abstractly' depended on

2.) function like 'normal' dependencies with regards to cache key calculation and build plans

3.) do not need to be explicitly stated in a bst element file, but are implied when an element specifies a condition-requirement on its dependencies

Contributor guide

Open the contributing guide

Research direction

Start by reading the linked mailing-list proposal’s “Create a new kind of dependency” section, especially part 2, and examine Element.dependencies(). Trace how dependencies affect cache keys, build plans, and staging artifacts. Done means abstract dependencies affect cache keys and build plans like normal dependencies, are excluded from staged dependency artifacts, and are implied by condition-requirements.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.