Problem
When a feature_requirements() target has deps on assumed_system_requirements(), the upstream requirement lobster files are not included in the dependable_element lobster config or report. This means derived_from links from feature requirements to system-level requirements silently produce unresolved references in the lobster coverage report.
Proposed Change
providers.bzl — add upstream_srcs field to FeatureRequirementsInfo:
FeatureRequirementsInfo = provider(
fields = {
"srcs": "...",
"upstream_srcs": "Depset of .lobster files from upstream req deps (e.g. assumed system requirements).",
"name": "...",
},
)
private/requirements.bzl — populate upstream_srcs when building FeatureRequirementsInfo: collect AssumedSystemRequirementsInfo.srcs from all deps and include as transitive depset.
private/component.bzl — propagate upstream_srcs alongside srcs when collecting feature requirement lobster files in _component_impl.
private/dependable_element.bzl — in _dependable_element_index_impl:
- collect
upstream_req_list from FeatureRequirementsInfo.upstream_srcs
- pass as
{UPSTREAM_REQ_SOURCES} substitution to lobster config template
- include in
all_lobster_inputs
lobster/config/lobster_de.conf.tpl — add section:
requirements "System Requirements" {
{UPSTREAM_REQ_SOURCES}
}
Motivation
Downstream projects that wire swe-as-code assumed_system_requirements into their dependable element currently get lobster warnings for every derived_from link pointing at a system-level requirement. This change makes the traceability chain complete without requiring system requirement TRLC files to be duplicated inside the downstream project.
Problem
When a
feature_requirements()target hasdepsonassumed_system_requirements(), the upstream requirement lobster files are not included in the dependable_element lobster config or report. This meansderived_fromlinks from feature requirements to system-level requirements silently produce unresolved references in the lobster coverage report.Proposed Change
providers.bzl— addupstream_srcsfield toFeatureRequirementsInfo:private/requirements.bzl— populateupstream_srcswhen buildingFeatureRequirementsInfo: collectAssumedSystemRequirementsInfo.srcsfrom alldepsand include as transitive depset.private/component.bzl— propagateupstream_srcsalongsidesrcswhen collecting feature requirement lobster files in_component_impl.private/dependable_element.bzl— in_dependable_element_index_impl:upstream_req_listfromFeatureRequirementsInfo.upstream_srcs{UPSTREAM_REQ_SOURCES}substitution to lobster config templateall_lobster_inputslobster/config/lobster_de.conf.tpl— add section:Motivation
Downstream projects that wire swe-as-code
assumed_system_requirementsinto their dependable element currently get lobster warnings for everyderived_fromlink pointing at a system-level requirement. This change makes the traceability chain complete without requiring system requirement TRLC files to be duplicated inside the downstream project.