Skip to content

Commit

Permalink
Switches all tools to host configuration.
Browse files Browse the repository at this point in the history
Refs #50.

`exec` is generally preferred, however it is not easily supported by `ts_project()` because we need to explicitly list all the Bazel artifact roots in `rootDirs` (https://bazelbuild.github.io/rules_nodejs/TypeScript.html#ts_project). `exec` dynamically computes artifact roots based on the target's configuration, which can change arbitrarily based on build flags and how targets are used. It's not fit to be hard-coded in a `tsconfig.json`. I left a `TODO` to switch back to `exec` after updating to `rules_js`, since it should be able to fix this particular rough edge.
  • Loading branch information
dgp1130 committed Jul 4, 2022
1 parent 6b38dc2 commit 760c961
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/rules_prerender/multi_inject_resources.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ multi_inject_resources = rule(
"_injector": attr.label(
default = "//tools/internal:resource_injector",
executable = True,
cfg = "exec",
cfg = "host", # TODO(#48): Use `exec`.
),
},
)
2 changes: 1 addition & 1 deletion packages/rules_prerender/prerender_pages_unbundled.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ _multi_extract_annotations = rule(
"_extractor": attr.label(
default = "//tools/internal:annotation_extractor",
executable = True,
cfg = "exec",
cfg = "host", # TODO(#48): Use `exec`.
),
},
doc = """Extracts annotations from HTML files in the provided directory.""",
Expand Down
2 changes: 1 addition & 1 deletion packages/rules_prerender/prerender_resources.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ _prerender_resources = rule(
"renderer": attr.label(
mandatory = True,
executable = True,
cfg = "exec",
cfg = "host", # TODO(#48): Use `exec`.
),
},
)
2 changes: 1 addition & 1 deletion packages/rules_prerender/web_resources.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ _web_resources_rule = rule(
"_packager": attr.label(
default = "//tools/internal:resource_packager",
executable = True,
cfg = "exec",
cfg = "host", # TODO(#48): Use `exec`.
),
},
)

0 comments on commit 760c961

Please sign in to comment.