Skip to content

Commit b8f486e

Browse files
committed
More tweaks and comments
1 parent a18f1a4 commit b8f486e

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

js/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
44
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
55

66
# Underscore prefix signals this is internal — do not rely on it.
7-
# It exists temporarily to allow opt-in to the new default (False) while
8-
# the ecosystem migrates, and will be removed once the default is flipped.
7+
# This controls the default value of the hoist_runfiles_to_exec_cfg flag on
8+
# js_run_binary, and is for CI testing only.
99
bool_flag(
1010
name = "_hoist_runfiles_to_exec_cfg",
1111
build_setting_default = False,

js/private/js_run_binary.bzl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ def js_run_binary(
158158
execution platform, which may not be the same as the target platform.
159159
160160
When set to `None` (the default), the value of the internal `//js:_hoist_runfiles_to_exec_cfg` build flag
161-
is used. Pass `--//js:_hoist_runfiles_to_exec_cfg=true` on the command line or in `.bazelrc` to enable
162-
globally. This flag is temporary and will be removed once the default is changed to `True`.
161+
is used. That flag is for internal testing only and should not be used. It is temporary and will be removed once
162+
the default is changed to `True`.
163163
164164
copy_srcs_to_bin: When True, all srcs files are copied to the output tree that are not already there.
165165
@@ -394,11 +394,12 @@ See https://github.com/aspect-build/rules_js/tree/main/docs#using-binaries-publi
394394
testonly = kwargs.get("testonly", False),
395395
)
396396
runfiles_label = ":{}".format(js_runfiles_name)
397-
if hoist_runfiles_to_exec_cfg == True:
397+
if hoist_runfiles_to_exec_cfg:
398398
tools.append(runfiles_label)
399399
elif hoist_runfiles_to_exec_cfg == False:
400400
extra_srcs.append(runfiles_label)
401401
else:
402+
# hoist_runfiles_to_exec_cfg is None, so we will defer to the flag.
402403
tools = tools + select({
403404
"@aspect_rules_js//js:_hoist_runfiles_to_exec_cfg_true": [runfiles_label],
404405
"//conditions:default": [],

0 commit comments

Comments
 (0)