BuildStream silently allows overriding list defined in include

Open
#2,028 3 comments 2 reactions 1 assignee View on GitHub

@nathanwilliams-ct is already working on this.

Since Aug 4, 2026.

Assessment

This issue has not been assessed yet.

Description

When you define a list like

build-depends:
- foo.bst
- bar.bst

in include and then set same in element body, there will be silent possibly unexpected replace when user was supposed to instead append. I propose behaviour be slightly adjusted such that when you redefine list with above syntax in element, there will be a warning that can be made fatal. (implicit-list-replace or something else, I'm up to different names) To fix the warning, you would have to in element in this case state intent you want to replace existing list through

build-depends:
  (=):
  - foo.bst
  - bar.bst

If the list is not defined before, then there will be no warning with the short-hand syntax.

Dominant language
Python
Stars
144
Forks
45
Avg merge
20h 38m
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/buildstream

All issues in apache/buildstream

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.