Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ bazel_dep(name = "score_rust_policies", version = "0.0.2")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "flatbuffers", version = "25.9.23")
bazel_dep(name = "download_utils", version = "1.2.2")
bazel_dep(name = "trlc", version = "3.0.0")
bazel_dep(name = "trlc", version = "3.0.1")
bazel_dep(name = "lobster", version = "1.0.6")
bazel_dep(name = "rules_distroless", version = "0.8.0")

Expand Down
12 changes: 6 additions & 6 deletions bazel/rules/rules_score/private/requirements.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def _requirements_impl(ctx):

# -------------------------------------------------------------------------
# Render TRLC → RST for Sphinx documentation.
# --source-files: own .trlc files — rendered AND registered for parsing.
# --source-files: own .trlc/.trlc.md files — rendered AND registered for parsing.
# --dep-files: spec .rsl + transitive .trlc deps — parsed but not rendered.
# -------------------------------------------------------------------------
rendered_file = ctx.actions.declare_file("{}.rst".format(ctx.attr.name))
Expand Down Expand Up @@ -144,13 +144,13 @@ _score_requirements_rule = rule(
implementation = _requirements_impl,
doc = """Shared internal rule for all S-CORE requirement kinds.

Accepts raw .trlc source files and emits TrlcProviderInfo so that
downstream requirement targets can list this target in their deps
Accepts raw .trlc or .trlc.md source files and emits TrlcProviderInfo
so that downstream requirement targets can list this target in their deps
directly, without needing an intermediate trlc_requirements wrapper.
""",
attrs = {
"srcs": attr.label_list(
allow_files = [".trlc"],
allow_files = [".trlc", ".trlc.md"],
mandatory = True,
doc = "TRLC source files containing requirement records.",
),
Expand Down Expand Up @@ -202,7 +202,7 @@ def score_requirements_rule(
Each entry in srcs is classified as follows:
- ".rst" files are converted to .trlc via rst_to_trlc and treated as
own sources.
- ".trlc" files are passed through unchanged as own sources.
- ".trlc" / ".trlc.md" files are passed through unchanged as own sources.
- Any other label is assumed to already provide TrlcProviderInfo (e.g.
an existing trlc_requirements/assumed_system_requirements/... target)
and is routed to ``deps`` instead, since only raw TRLC files may be
Expand Down Expand Up @@ -236,7 +236,7 @@ def score_requirements_rule(
)
trlc_srcs.append(":" + gen_name)
resolved_srcs.append(":" + gen_name)
elif type(src) == type("") and src.endswith(".trlc"):
elif (type(src) == type("")) and (src.endswith(".trlc") or src.endswith(".trlc.md")):
trlc_srcs.append(src)
resolved_srcs.append(src)
else:
Expand Down
Loading