Skip to content

Commit 2703b36

Browse files
acozzetteclaude
andcommitted
refactor: rename flag to _hoist_runfiles_to_exec_cfg to signal it is internal
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
1 parent e3d39e0 commit 2703b36

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ jobs:
143143
bazel test \
144144
--test_tag_filters=-skip-on-bazel7 \
145145
--build_tag_filters=-skip-on-bazel7 \
146-
--@aspect_rules_js//js:hoist_runfiles_to_exec_cfg=true \
146+
--@aspect_rules_js//js:_hoist_runfiles_to_exec_cfg=true \
147147
//...
148148
149149
# Mac/Windows smoke tests - only e2e/bzlmod

js/BUILD.bazel

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@
33
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
44
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
55

6+
# 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.
69
bool_flag(
7-
name = "hoist_runfiles_to_exec_cfg",
10+
name = "_hoist_runfiles_to_exec_cfg",
811
build_setting_default = False,
912
visibility = ["//visibility:public"],
1013
)
1114

1215
config_setting(
13-
name = "hoist_runfiles_to_exec_cfg_true",
14-
flag_values = {":hoist_runfiles_to_exec_cfg": "True"},
16+
name = "_hoist_runfiles_to_exec_cfg_true",
17+
flag_values = {"_hoist_runfiles_to_exec_cfg": "True"},
1518
)
1619

1720
bzl_library(

js/private/js_run_binary.bzl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,9 @@ def js_run_binary(
157157
results in a more correct build by ensuring that code that is executed during a build action is built for the
158158
execution platform, which may not be the same as the target platform.
159159
160-
When set to `None` (the default), the value of the `//js:hoist_runfiles_to_exec_cfg` build flag is used.
161-
Pass `--//js:hoist_runfiles_to_exec_cfg=true` on the command line or in `.bazelrc` to enable globally.
160+
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`.
162163
163164
copy_srcs_to_bin: When True, all srcs files are copied to the output tree that are not already there.
164165
@@ -399,11 +400,11 @@ See https://github.com/aspect-build/rules_js/tree/main/docs#using-binaries-publi
399400
extra_srcs.append(runfiles_label)
400401
else:
401402
tools = tools + select({
402-
"//js:hoist_runfiles_to_exec_cfg_true": [runfiles_label],
403+
"//js:_hoist_runfiles_to_exec_cfg_true": [runfiles_label],
403404
"//conditions:default": [],
404405
})
405406
extra_srcs = extra_srcs + select({
406-
"//js:hoist_runfiles_to_exec_cfg_true": [],
407+
"//js:_hoist_runfiles_to_exec_cfg_true": [],
407408
"//conditions:default": [runfiles_label],
408409
})
409410

0 commit comments

Comments
 (0)