Declaration order of dependencies affects staging order and cache keys
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- build-system
Research direction
Start in loadelement.pyx and review the dependency comparison described in the investigation of #1988 and the Python-version issue in #1993. Define a sorting approach whose result does not depend on dependency declaration order, then determine how the behavior can be enabled per project. Done means reordered dependencies produce the same staging order and cache key without changing existing projects by default.
Written by the indexing model from the issue text.
Description
The intent of sorting dependencies (done in loadelement.pyx) was that the staging order would be independent of the declaration order of dependencies in .bst files. As part of the investigation into #1988, it has become clear that the comparison function is broken as it does not impose a total ordering. Besides resulting in different sort orders with different Python versions (addressed in #1993), this also means that reordering dependencies in .bst files sometimes results in a change in staging order, which in turn results in a change in cache key.
BuildStream should implement a better sorting algorithm that is independent of the declaration order. As this would change staging order and cache keys of existing projects, this should be opt-in per project.
- Dominant language
- Python
- Stars
- 144
- Forks
- 45
- Avg merge
- 20h 38m
- Merged PRs (30d)
- 6
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/buildstream
-
logging
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
apache/buildstream#2150 · 3 comments ·
-
question
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
apache/buildstream#2143 · 2 comments · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
apache/buildstream#2194 ·
-
Modification time of an element with an open workspace propagates into consumer element's sandbox Openbug
Difficulty 3/5 1-2 days Newbie friendliness 58/100
apache/buildstream#2186 · 2 comments · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
apache/buildstream#2184 · 1 comment ·
All issues in apache/buildstream
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100