Skip to content

Commit 350763d

Browse files
erkamyamancrisbeto
authored andcommitted
fix(docs-infra): restore adev build under stricter ts_project deps
The cross-repo dependency update in angular#69410 bumped rules_angular, whose ts_project now requires every entry in `deps` to provide the JsInfo provider. Two adev targets passed deps that don't, so `bazel build //adev:build` fails analysis and the adev CI check has been red on main since that PR. Make generate_nav_items return JsInfo (with the generated routes.json as its sources) so navigation-entries can keep importing routes.json through its deps. Also drop the spurious deps entry on llms_lib: llms.mts reads llms-list.md at runtime via readFile rather than importing it, and the file is already provided to the binary via data. Fixes angular#69429
1 parent 7e1fcd4 commit 350763d

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

adev/shared-docs/pipeline/_navigation.bzl

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@aspect_rules_js//js:providers.bzl", "js_info")
2+
13
def _generate_nav_items(ctx):
24
"""Implementation of the navigation items data generator rule"""
35

@@ -33,9 +35,18 @@ def _generate_nav_items(ctx):
3335
},
3436
)
3537

36-
# The return value describes what the rule is producing. In this case we need to specify
37-
# the "DefaultInfo" with the output json file.
38-
return [DefaultInfo(files = depset([json_output]))]
38+
# The return value describes what the rule is producing. We expose the generated JSON via
39+
# both DefaultInfo and JsInfo so it can be consumed as a `ts_project` dependency (the new
40+
# rules_angular `ts_project` requires deps to provide JsInfo).
41+
outputs = depset([json_output])
42+
return [
43+
DefaultInfo(files = outputs),
44+
js_info(
45+
target = ctx.label,
46+
sources = outputs,
47+
transitive_sources = outputs,
48+
),
49+
]
3950

4051
generate_nav_items = rule(
4152
# Point to the starlark function that will execute for this rule.

adev/src/context/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ ts_project(
2727
name = "llms_lib",
2828
srcs = ["llms.mts"],
2929
tsconfig = ":tsconfig_build",
30-
deps = [":llms_src"],
3130
)
3231

3332
js_binary(

0 commit comments

Comments
 (0)