Skip to content

feat: add flag controlling the default for use_execroot_entry_point#2837

Open
acozzette wants to merge 9 commits into
aspect-build:mainfrom
acozzette:use-execroot-entry-point
Open

feat: add flag controlling the default for use_execroot_entry_point#2837
acozzette wants to merge 9 commits into
aspect-build:mainfrom
acozzette:use-execroot-entry-point

Conversation

@acozzette
Copy link
Copy Markdown
Contributor

@acozzette acozzette commented May 12, 2026

This change introduces the flag --@aspect_rules_js//js:use_execroot_entry_point, which controls the default behavior of the use_execroot_entry_point option on js_run_binary.

We could like to recommend moving away from enabling use_execroot_entry_point, and this flag provides an easy way to do that at a global level, while still making it possible to override that on specific targets if necessary.

I also added CI test runs with --@aspect_rules_js//js:use_execroot_entry_point=False so that we have good test coverage of both modes. This required explicitly setting use_execroot_entry_point on some targets that only work with one more or the other.


Changes are visible to end-users: yes

  • Searched for relevant documentation and updated as needed: yes
  • Breaking change (forces users to change their own code or config): no
  • Suggested release notes appear below: yes

There is now a --@aspect_rules_js//js:use_execroot_entry_point flag which can be set to True or False to determine the default use_execroot_entry_point behavior for js_run_binary.

Test plan

  • Covered by existing test cases
  • New test cases added

@aspect-workflows
Copy link
Copy Markdown

aspect-workflows Bot commented May 12, 2026

Bazel 7 (Test)

262 test targets passed

Targets
//:node_modules_build_test [k8-fastbuild]                                                             49ms
//:npm_link_targets_node_modules_build_test [k8-fastbuild]                                            34ms
//:npm_link_targets_test [k8-fastbuild]                                                               36ms
//js/private/coverage:coverage_checked_test [k8-fastbuild]                                            47ms
//js/private/node-patches:checked_in_compile_test [k8-fastbuild]                                      67ms
//js/private/test/create_launcher:test [k8-fastbuild]                                                 81ms
//js/private/test/data:chdir-source-data [k8-fastbuild]                                               124ms
//js/private/test/data:from-genrule-data [k8-fastbuild]                                               103ms
//js/private/test/data:from-js_run_binary-genrule-copied [k8-fastbuild]                               126ms
//js/private/test/data:from-js_run_binary-js_library-data [k8-fastbuild]                              133ms
//js/private/test/data:from-js_run_binary-js_library-srcs [k8-fastbuild]                              78ms
//js/private/test/data:from-parent-genrule [k8-fastbuild]                                             75ms
//js/private/test/fixed_args:args_test [k8-fastbuild]                                                 97ms
//js/private/test/fixed_args:fixed_args_test [k8-fastbuild]                                           125ms
//js/private/test/image/non_ascii:assert_custom_layer_groups_test_app_test [k8-fastbuild]             43ms
//js/private/test/image/non_ascii:assert_custom_layer_groups_test_node_test [k8-fastbuild]            48ms
//js/private/test/image:assert_custom_layers_nomatch_test_app_test [k8-fastbuild]                     60ms
//js/private/test/image:assert_custom_layers_nomatch_test_package_store_3p_test [k8-fastbuild]        44ms
//js/private/test/image:assert_custom_owner_test_app_test [k8-fastbuild]                              36ms
//js/private/test/image:assert_custom_owner_test_package_store_1p_test [k8-fastbuild]                 49ms
//js/private/test/image:assert_default_test_app_test [k8-fastbuild]                                   73ms
//js/private/test/image:assert_default_test_node_modules_test [k8-fastbuild]                          64ms
//js/private/test/image:assert_default_test_node_test [k8-fastbuild]                                  33ms
//js/private/test/image:assert_default_test_package_store_3p_test [k8-fastbuild]                      64ms
//js/private/test/image:assert_regex_edge_cases_test_node_test [k8-fastbuild]                         70ms
//js/private/test/js_binary_sh:BAZEL_BINDIR_change_directory_test [k8-fastbuild]                      112ms
//js/private/test/js_binary_sh:BAZEL_PACKAGE_test [k8-fastbuild]                                      93ms
//js/private/test/js_binary_sh:BAZEL_TARGET_test [k8-fastbuild]                                       101ms
//js/private/test/js_binary_sh:JS_BINARY__BINDIR_test [k8-fastbuild]                                  88ms
//js/private/test/js_binary_sh:JS_BINARY__BUILD_FILE_PATH_test [k8-fastbuild]                         76ms
//js/private/test/js_binary_sh:JS_BINARY__TARGET_NAME_test [k8-fastbuild]                             137ms
//js/private/test/js_binary_sh:JS_BINARY__TARGET_test [k8-fastbuild]                                  118ms
//js/private/test/js_binary_sh:JS_BINARY__WORKSPACE_test [k8-fastbuild]                               96ms
//js/private/test/js_binary_sh:env_json_encode_value [k8-fastbuild]                                   145ms
//js/private/test/js_binary_sh:env_json_str_value [k8-fastbuild]                                      69ms
//js/private/test/js_binary_sh:env_json_value [k8-fastbuild]                                          81ms
//js/private/test/js_binary_sh:regexy-args [k8-fastbuild]                                             54ms
//js/private/test/js_binary_sh:regexy-args-1 [k8-fastbuild]                                           95ms
//js/private/test/js_binary_sh:regexy-args-2 [k8-fastbuild]                                           89ms
//js/private/test/js_run_binary:linux_target_platform_test [k8-fastbuild]                             69ms
//js/private/test/js_run_binary:runfiles_test [k8-fastbuild]                                          85ms
//js/private/test/js_run_devserver:js_run_devserver_test [k8-fastbuild]                               141ms
//js/private/test/js_run_devserver:node_modules_symlink_to_execroot_test [k8-fastbuild]               288ms
//js/private/test/node-patches:escape_node20_test [k8-fastbuild]                                      199ms
//js/private/test/node-patches:escape_node24_test [k8-fastbuild]                                      91ms
//js/private/test/node-patches:lstat_node22_test [k8-fastbuild]                                       245ms
//js/private/test/node-patches:lstat_node24_cjs_test [k8-fastbuild]                                   120ms
//js/private/test/node-patches:lstat_nodejs_cjs_test [k8-fastbuild]                                   148ms
//js/private/test/node-patches:opendir_node22_cjs_test [k8-fastbuild]                                 156ms
//js/private/test/node-patches:readdir_node24_cjs_test [k8-fastbuild]                                 145ms
//js/private/test/node-patches:readdir_nodejs_cjs_test [k8-fastbuild]                                 116ms
//js/private/test/node-patches:readdir_nodejs_test [k8-fastbuild]                                     142ms
//js/private/test/node-patches:readlink_node22_test [k8-fastbuild]                                    161ms
//js/private/test/node-patches:readlink_node24_cjs_test [k8-fastbuild]                                120ms
//js/private/test/node-patches:readlink_nodejs_cjs_test [k8-fastbuild]                                127ms
//js/private/test/node-patches:readlink_nodejs_test [k8-fastbuild]                                    170ms
//js/private/test/node-patches:realpath_node22_test [k8-fastbuild]                                    200ms
//js/private/test/node-patches:realpath_nodejs_cjs_test [k8-fastbuild]                                170ms
//js/private/test/node-patches:spawn_test_node20 [k8-fastbuild]                                       833ms
//js/private/test/node-patches:spawn_test_node22 [k8-fastbuild]                                       775ms
//js/private/test/node-patches:spawn_test_node24 [k8-fastbuild]                                       724ms
//js/private/test/proto:cross_package_dep_fail_test [k8-fastbuild]                                    27ms
//js/private/test/proto:proto_args_test [k8-fastbuild]                                                50ms
//js/private/test:main_toolchain_20 [k8-fastbuild]                                                    103ms
//js/private/test:run_environment_info_tests_binary_env_test [k8-fastbuild]                           44ms
//js/private/test:run_environment_info_tests_binary_no_env_test [k8-fastbuild]                        33ms
//js/private/test:run_environment_info_tests_test_inherit_only_test [k8-fastbuild]                    88ms
//js/private/test:transitive_type_deps_test [k8-fastbuild]                                            50ms
//js/private/test:write_launcher_test [k8-fastbuild]                                                  36ms
//npm/private/lifecycle/min:write_min_test [k8-fastbuild]                                             82ms
//npm/private/test/npm_package:test_pkg_with_node_modules [k8-fastbuild]                              60ms
//npm/private/test/npm_package_publish:test [k8-fastbuild]                                            1s
//npm/private/test/subs:require_non-importers_test [k8-fastbuild]                                     131ms
//npm/private/test:node_modules_test [k8-fastbuild]                                                   17ms
//npm/private/test:npm_auth_tests_test_2 [k8-fastbuild]                                               56ms
//npm/private/test:test_generated_pkg_json___rollup-binary__entry_point_tagged_manual [k8-fastbuild]  108ms
//npm/private/test:test_generated_pkg_json___rollup-target_js_info_files_tagged_manual [k8-fastbuild] 102ms
//npm/private/test:test_generated_pkg_json___rollup-target_runfiles_lib_tagged_manual [k8-fastbuild]  106ms
//npm/private/test:test_npm_package_visibility_test_1 [k8-fastbuild]                                  38ms
//npm/private/test:test_npm_package_visibility_test_12 [k8-fastbuild]                                 61ms
//npm/private/test:test_npm_package_visibility_test_13 [k8-fastbuild]                                 39ms
//npm/private/test:test_npm_package_visibility_test_2 [k8-fastbuild]                                  108ms
//npm/private/test:test_npm_package_visibility_test_3 [k8-fastbuild]                                  38ms
//npm/private/test:test_npm_package_visibility_test_6 [k8-fastbuild]                                  104ms
//npm/private/test:test_npm_package_visibility_test_9 [k8-fastbuild]                                  43ms
//npm/private/test:test_npmrc_test_0 [k8-fastbuild]                                                   98ms
//npm/private/test:test_npmrc_test_2 [k8-fastbuild]                                                   57ms
//npm/private/test:test_npmrc_test_3 [k8-fastbuild]                                                   149ms
//npm/private/test:test_npmrc_test_5 [k8-fastbuild]                                                   110ms
//npm/private/test:test_npmrc_test_7 [k8-fastbuild]                                                   63ms
//npm/private/test:test_pnpm_test_1 [k8-fastbuild]                                                    168ms
//npm/private/test:test_pnpm_test_3 [k8-fastbuild]                                                    86ms
//npm/private/test:test_pnpm_test_7 [k8-fastbuild]                                                    28ms
//npm/private/test:test_translate_lock_test_3 [k8-fastbuild]                                          56ms
//npm/private/test:test_translate_lock_test_4 [k8-fastbuild]                                          122ms
//npm/private/test:test_utils_test_5 [k8-fastbuild]                                                   43ms
//npm/private/test:test_utils_test_6 [k8-fastbuild]                                                   126ms
//npm/private/test:write_npm_translate_lock_5_test [k8-fastbuild]                                     230ms
//npm/private/test:write_npm_translate_lock_8_test [k8-fastbuild]                                     286ms
//npm/private/test:write_npm_translate_lock_9_test [k8-fastbuild]                                     167ms
+ 162 other targets

Bazel 8 (Test)

All tests were cache hits

250 tests (100.0%) were fully cached saving 29s.


Bazel 9 (no execroot entry point) (Test)

All tests were cache hits

250 tests (100.0%) were fully cached saving 32s.


Bazel 9 (Test)

All tests were cache hits

250 tests (100.0%) were fully cached saving 32s.


Bazel 7 (Test)

e2e/bzlmod

7 test targets passed

Targets
//:check_styles [k8-fastbuild]                                                                        123ms
//:jasmine_test [k8-fastbuild]                                                                        149ms
//:node_modules_test [k8-fastbuild]                                                                   32ms
//:other_module_binary_test [k8-fastbuild]                                                            69ms
//:other_module_linked_packages [k8-fastbuild]                                                        62ms
//:other_module_run_binary_test [k8-fastbuild]                                                        42ms
//:test [k8-fastbuild]                                                                                92ms

Bazel 8 (Test)

e2e/bzlmod

All tests were cache hits

7 tests (100.0%) were fully cached saving 642ms.


Bazel 9 (no execroot entry point) (Test)

e2e/bzlmod

All tests were cache hits

7 tests (100.0%) were fully cached saving 596ms.


Bazel 9 (Test)

e2e/bzlmod

All tests were cache hits

7 tests (100.0%) were fully cached saving 596ms.


Bazel 7 (Test)

e2e/git_dep_metadata

1 test target passed

Targets
//:no_git_metadata_test                                                                               21ms

Bazel 8 (Test)

e2e/git_dep_metadata

All tests were cache hits

1 test (100.0%) was fully cached saving 26ms.


Bazel 9 (no execroot entry point) (Test)

e2e/git_dep_metadata

All tests were cache hits

1 test (100.0%) was fully cached saving 30ms.


Bazel 9 (Test)

e2e/git_dep_metadata

All tests were cache hits

1 test (100.0%) was fully cached saving 30ms.


Bazel 7 (Test)

e2e/gyp_no_install_script

2 test targets passed

Targets
//:test [k8-fastbuild]                                                                                64ms
//:write_npm_translate_lock_bzlmod_test [k8-fastbuild]                                                109ms

Bazel 8 (Test)

e2e/gyp_no_install_script

All tests were cache hits

1 test (100.0%) was fully cached saving 50ms.


Bazel 9 (no execroot entry point) (Test)

e2e/gyp_no_install_script

All tests were cache hits

1 test (100.0%) was fully cached saving 46ms.


Bazel 9 (Test)

e2e/gyp_no_install_script

All tests were cache hits

1 test (100.0%) was fully cached saving 46ms.


Bazel 7 (Test)

e2e/js_binary_workspace

4 test targets passed

Targets
//:js_run_binary_chdir_test [k8-fastbuild]                                                            78ms
//:test [k8-fastbuild]                                                                                55ms
@@workspace~//:js_binary_chdir_test [k8-fastbuild]                                                    81ms
@@workspace~//:js_test_chdir_test [k8-fastbuild]                                                      110ms

Bazel 8 (Test)

e2e/js_binary_workspace

All tests were cache hits

4 tests (100.0%) were fully cached saving 226ms.


Bazel 9 (no execroot entry point) (Test)

e2e/js_binary_workspace

All tests were cache hits

4 tests (100.0%) were fully cached saving 252ms.


Bazel 9 (Test)

e2e/js_binary_workspace

All tests were cache hits

4 tests (100.0%) were fully cached saving 238ms.


Bazel 8 (Test)

e2e/js_image_oci

All tests were cache hits

1 test (100.0%) was fully cached saving 4s.


Bazel 9 (no execroot entry point) (Test)

e2e/js_image_oci

All tests were cache hits

1 test (100.0%) was fully cached saving 4s.


Bazel 9 (Test)

e2e/js_image_oci

All tests were cache hits

1 test (100.0%) was fully cached saving 4s.


Bazel 7 (Test)

e2e/nextjs

3 test targets passed

Targets
//v15/cjs:test [k8-fastbuild]                                                                         24ms
//v15/esm:test [k8-fastbuild]                                                                         18ms
//v15/mjs:test [k8-fastbuild]                                                                         65ms

Bazel 8 (Test)

e2e/nextjs

All tests were cache hits

3 tests (100.0%) were fully cached saving 94ms.


Bazel 9 (no execroot entry point) (Test)

e2e/nextjs

All tests were cache hits

3 tests (100.0%) were fully cached saving 112ms.


Bazel 9 (Test)

e2e/nextjs

All tests were cache hits

3 tests (100.0%) were fully cached saving 112ms.


Bazel 7 (Test)

e2e/npm_link_package

4 test targets passed

Targets
//cjs/src:test [k8-fastbuild]                                                                         159ms
//cjs:package_store_targets_test [k8-fastbuild]                                                       65ms
//esm/src:test [k8-fastbuild]                                                                         164ms
//esm:package_store_targets_test [k8-fastbuild]                                                       55ms

Bazel 8 (Test)

e2e/npm_link_package

All tests were cache hits

4 tests (100.0%) were fully cached saving 363ms.


Bazel 9 (no execroot entry point) (Test)

e2e/npm_link_package

All tests were cache hits

4 tests (100.0%) were fully cached saving 415ms.


Bazel 9 (Test)

e2e/npm_link_package

All tests were cache hits

4 tests (100.0%) were fully cached saving 415ms.


Bazel 7 (Test)

e2e/npm_link_package-rerooted

2 test targets passed

Targets
//root/src:test [k8-fastbuild]                                                                        117ms
//root:package_store_targets_test [k8-fastbuild]                                                      57ms

Bazel 8 (Test)

e2e/npm_link_package-rerooted

All tests were cache hits

2 tests (100.0%) were fully cached saving 139ms.


Bazel 9 (no execroot entry point) (Test)

e2e/npm_link_package-rerooted

All tests were cache hits

2 tests (100.0%) were fully cached saving 186ms.


Bazel 9 (Test)

e2e/npm_link_package-rerooted

All tests were cache hits

2 tests (100.0%) were fully cached saving 186ms.


Bazel 7 (Test)

e2e/npm_translate_lock

3 test targets passed

Targets
//:test                                                                                               30ms
//:test_dev_filtering                                                                                 112ms
//:test_prod_filtering                                                                                135ms

Bazel 8 (Test)

e2e/npm_translate_lock

All tests were cache hits

3 tests (100.0%) were fully cached saving 287ms.


Bazel 9 (no execroot entry point) (Test)

e2e/npm_translate_lock

All tests were cache hits

3 tests (100.0%) were fully cached saving 289ms.


Bazel 9 (Test)

e2e/npm_translate_lock

All tests were cache hits

3 tests (100.0%) were fully cached saving 289ms.


Bazel 7 (Test)

e2e/npm_translate_lock_disable_hooks

Buildkite build #12752 is running...


Bazel 8 (Test)

e2e/npm_translate_lock_disable_hooks

All tests were cache hits

1 test (100.0%) was fully cached saving 62ms.


Bazel 9 (no execroot entry point) (Test)

e2e/npm_translate_lock_disable_hooks

All tests were cache hits

1 test (100.0%) was fully cached saving 32ms.


Bazel 9 (Test)

e2e/npm_translate_lock_disable_hooks

All tests were cache hits

1 test (100.0%) was fully cached saving 32ms.


Bazel 7 (Test)

e2e/npm_translate_lock_empty

2 test targets passed

Targets
//:test [k8-fastbuild]                                                                                17ms
//:write_npm_translate_lock_bzlmod_test [k8-fastbuild]                                                69ms

Bazel 8 (Test)

e2e/npm_translate_lock_empty

All tests were cache hits

2 tests (100.0%) were fully cached saving 114ms.


Bazel 9 (no execroot entry point) (Test)

e2e/npm_translate_lock_empty

All tests were cache hits

2 tests (100.0%) were fully cached saving 105ms.


Bazel 9 (Test)

e2e/npm_translate_lock_empty

All tests were cache hits

2 tests (100.0%) were fully cached saving 105ms.


Bazel 7 (Test)

e2e/npm_translate_lock_exclude_package_contents

1 test target passed

Targets
//:test_sh                                                                                            41ms

Bazel 8 (Test)

e2e/npm_translate_lock_exclude_package_contents

All tests were cache hits

1 test (100.0%) was fully cached saving 21ms.


Bazel 9 (no execroot entry point) (Test)

e2e/npm_translate_lock_exclude_package_contents

All tests were cache hits

1 test (100.0%) was fully cached saving 86ms.


Bazel 9 (Test)

e2e/npm_translate_lock_exclude_package_contents

All tests were cache hits

1 test (100.0%) was fully cached saving 86ms.


Bazel 7 (Test)

e2e/npm_translate_lock_multi

2 test targets passed

Targets
//app1:test                                                                                           43ms
//app2:test                                                                                           41ms

Bazel 8 (Test)

e2e/npm_translate_lock_multi

All tests were cache hits

2 tests (100.0%) were fully cached saving 54ms.


Bazel 9 (no execroot entry point) (Test)

e2e/npm_translate_lock_multi

Buildkite build #12752 is running...


Bazel 9 (Test)

e2e/npm_translate_lock_multi

All tests were cache hits

2 tests (100.0%) were fully cached saving 113ms.


Bazel 7 (Test)

e2e/npm_translate_lock_partial_clone

1 test target passed

Targets
//root:test                                                                                           24ms

Bazel 8 (Test)

e2e/npm_translate_lock_partial_clone

All tests were cache hits

1 test (100.0%) was fully cached saving 30ms.


Bazel 9 (no execroot entry point) (Test)

e2e/npm_translate_lock_partial_clone

All tests were cache hits

1 test (100.0%) was fully cached saving 38ms.


Bazel 9 (Test)

e2e/npm_translate_lock_partial_clone

All tests were cache hits

1 test (100.0%) was fully cached saving 38ms.


Bazel 7 (Test)

e2e/npm_translate_lock_replace_packages

4 test targets passed

Targets
//:node_modules_test [k8-fastbuild]                                                                   29ms
//:test [k8-fastbuild]                                                                                72ms
//:utils_test [k8-fastbuild]                                                                          58ms
//:write_npm_translate_lock_bzlmod_test [k8-fastbuild]                                                61ms

Bazel 8 (Test)

e2e/npm_translate_lock_replace_packages

All tests were cache hits

4 tests (100.0%) were fully cached saving 249ms.


Bazel 9 (no execroot entry point) (Test)

e2e/npm_translate_lock_replace_packages

All tests were cache hits

4 tests (100.0%) were fully cached saving 320ms.


Bazel 9 (Test)

e2e/npm_translate_lock_replace_packages

All tests were cache hits

4 tests (100.0%) were fully cached saving 320ms.


Bazel 7 (Test)

e2e/npm_translate_lock_subdir_patch

1 test target passed

Targets
//subdir:test                                                                                         67ms

Bazel 8 (Test)

e2e/npm_translate_lock_subdir_patch

Buildkite build #12752 is running...


Bazel 9 (no execroot entry point) (Test)

e2e/npm_translate_lock_subdir_patch

All tests were cache hits

1 test (100.0%) was fully cached saving 50ms.


Bazel 9 (Test)

e2e/npm_translate_lock_subdir_patch

Buildkite build #12752 is running...


Bazel 7 (Test)

e2e/npm_translate_package_lock

Buildkite build #12752 is running...


Bazel 8 (Test)

e2e/npm_translate_package_lock

Buildkite build #12752 is running...


Bazel 9 (no execroot entry point) (Test)

e2e/npm_translate_package_lock

Buildkite build #12752 is running...


Bazel 9 (Test)

e2e/npm_translate_package_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 32ms.


Bazel 7 (Test)

e2e/npm_translate_yarn_lock

1 test target passed

Targets
//:test                                                                                               20ms

Bazel 8 (Test)

e2e/npm_translate_yarn_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 62ms.


Bazel 9 (no execroot entry point) (Test)

e2e/npm_translate_yarn_lock

Buildkite build #12752 is running...


Bazel 9 (Test)

e2e/npm_translate_yarn_lock

Buildkite build #12752 is running...


Bazel 7 (Test)

e2e/output_paths

Waiting for runner...


Bazel 8 (Test)

e2e/output_paths

Buildkite build #12752 is running...


Bazel 9 (no execroot entry point) (Test)

e2e/output_paths

All tests were cache hits

2 tests (100.0%) were fully cached saving 171ms.


Bazel 9 (Test)

e2e/output_paths

Waiting for runner...


Bazel 7 (Test)

e2e/patch_from_repo

Waiting for runner...


Bazel 7 (Test)

e2e/pnpm_lockfiles

Buildkite build #12752 is running...


Bazel 8 (Test)

e2e/pnpm_lockfiles

Buildkite build #12752 is running...


Bazel 9 (no execroot entry point) (Test)

e2e/pnpm_lockfiles

Buildkite build #12752 is running...


Bazel 9 (Test)

e2e/pnpm_lockfiles

Buildkite build #12752 is running...


Bazel 7 (Test)

e2e/pnpm_repo_install

Buildkite build #12752 is running...


Bazel 8 (Test)

e2e/pnpm_repo_install

Buildkite build #12752 is running...


Bazel 9 (no execroot entry point) (Test)

e2e/pnpm_repo_install

Buildkite build #12752 is running...


Bazel 9 (Test)

e2e/pnpm_repo_install

Buildkite build #12752 is running...


Bazel 7 (Test)

e2e/pnpm_workspace

Buildkite build #12752 is running...


Bazel 8 (Test)

e2e/pnpm_workspace

Buildkite build #12752 is running...


Bazel 9 (no execroot entry point) (Test)

e2e/pnpm_workspace

Buildkite build #12752 is running...


Bazel 9 (Test)

e2e/pnpm_workspace

Buildkite build #12752 is running...


Bazel 7 (Test)

e2e/pnpm_workspace_deps

Buildkite build #12752 is running...


Bazel 8 (Test)

e2e/pnpm_workspace_deps

Waiting for runner...


Bazel 9 (no execroot entry point) (Test)

e2e/pnpm_workspace_deps

Buildkite build #12752 is running...


Bazel 9 (Test)

e2e/pnpm_workspace_deps

All tests were cache hits

3 tests (100.0%) were fully cached saving 237ms.


Bazel 7 (Test)

e2e/pnpm_workspace_rerooted

15 test targets passed

Targets
//:node_test [k8-fastbuild]                                                                           335ms
//:repos_test [k8-fastbuild]                                                                          115ms
//:vendored [k8-fastbuild]                                                                            47ms
//app/a:aspect_test_a_bin_test [k8-fastbuild]                                                         104ms
//app/a:npm_link_targets_node_modules_build_test [k8-fastbuild]                                       58ms
//app/a:npm_link_targets_test [k8-fastbuild]                                                          129ms
//app/a:test [k8-fastbuild]                                                                           151ms
//app/b:aliases [k8-fastbuild]                                                                        68ms
//app/b:test [k8-fastbuild]                                                                           144ms
//app/c:aspect_test_a_bin_test [k8-fastbuild]                                                         167ms
//app/c:test [k8-fastbuild]                                                                           135ms
//app/d:test [k8-fastbuild]                                                                           147ms
//lib/a:vendored [k8-fastbuild]                                                                       64ms
//lib/b:aliases [k8-fastbuild]                                                                        82ms
//lib/d:aliases [k8-fastbuild]                                                                        66ms

Bazel 8 (Test)

e2e/pnpm_workspace_rerooted

Waiting for runner...


Bazel 9 (no execroot entry point) (Test)

e2e/pnpm_workspace_rerooted

All tests were cache hits

14 tests (100.0%) were fully cached saving 2s.


Bazel 9 (Test)

e2e/pnpm_workspace_rerooted

Waiting for runner...


Bazel 7 (Test)

e2e/protobuf-es

Buildkite build #12752 is running...


Bazel 8 (Test)

e2e/protobuf-es

All tests were cache hits

3 tests (100.0%) were fully cached saving 664ms.


Bazel 9 (no execroot entry point) (Test)

e2e/protobuf-es

Waiting for runner...


Bazel 9 (Test)

e2e/protobuf-es

Buildkite build #12752 is running...


Bazel 7 (Test)

e2e/protobuf-google

2 test targets passed

Targets
//:test [k8-fastbuild]                                                                                92ms
//:test_grpc [k8-fastbuild]                                                                           165ms

Bazel 8 (Test)

e2e/protobuf-google

Buildkite build #12752 is running...


Bazel 9 (no execroot entry point) (Test)

e2e/protobuf-google

All tests were cache hits

2 tests (100.0%) were fully cached saving 245ms.


Bazel 9 (Test)

e2e/protobuf-google

Waiting for runner...


Bazel 7 (Test)

e2e/repo_mapping

Waiting for runner...


Bazel 8 (Test)

e2e/repo_mapping

Waiting for runner...


Bazel 9 (Test)

e2e/repo_mapping

Buildkite build #12752 is running...


Bazel 7 (Test)

e2e/vendored_node

Waiting for runner...


Bazel 8 (Test)

e2e/vendored_node

Buildkite build #12752 is running...


Bazel 9 (no execroot entry point) (Test)

e2e/vendored_node

All tests were cache hits

1 test (100.0%) was fully cached saving 57ms.


Bazel 9 (Test)

e2e/vendored_node

All tests were cache hits

1 test (100.0%) was fully cached saving 57ms.


Bazel 7 (Test)

e2e/vendored_tarfile

Waiting for runner...


Bazel 8 (Test)

e2e/vendored_tarfile

Buildkite build #12752 is running...


Bazel 9 (no execroot entry point) (Test)

e2e/vendored_tarfile

Waiting for runner...


Bazel 9 (Test)

e2e/vendored_tarfile

All tests were cache hits

1 test (100.0%) was fully cached saving 32ms.


Bazel 7 (Test)

e2e/verify_patches

2 test targets passed

Targets
//:test [k8-fastbuild]                                                                                24ms
//patches:patches_update_test [k8-fastbuild]                                                          95ms

Bazel 8 (Test)

e2e/verify_patches

All tests were cache hits

2 tests (100.0%) were fully cached saving 120ms.


Bazel 9 (no execroot entry point) (Test)

e2e/verify_patches

Buildkite build #12752 is running...


Bazel 9 (Test)

e2e/verify_patches

Buildkite build #12752 is running...


Bazel 7 (Test)

examples

84 test targets passed

Targets
//:linked_packages_build_test [k8-fastbuild]                                                          49ms
//coverage:coverage [k8-fastbuild]                                                                    97ms
//genrule:test_acorn [k8-fastbuild]                                                                   34ms
//genrule:test_require_acorn [k8-fastbuild]                                                           62ms
//js_binary:aspect_bin_a_test [k8-fastbuild]                                                          133ms
//js_binary:case7_test [k8-fastbuild]                                                                 90ms
//js_binary:npm_version_test [k8-fastbuild]                                                           435ms
//js_binary:test13-1_cjs [k8-fastbuild]                                                               45ms
//js_binary:test13-1_mjs [k8-fastbuild]                                                               38ms
//js_binary:test13-2_cjs [k8-fastbuild]                                                               84ms
//js_binary:test13-2_mjs [k8-fastbuild]                                                               59ms
//js_binary:test4-b_cjs [k8-fastbuild]                                                                36ms
//js_binary:test4-b_mjs [k8-fastbuild]                                                                35ms
//js_binary:test4-cjs-a [k8-fastbuild]                                                                52ms
//js_binary:test4-mjs-a [k8-fastbuild]                                                                53ms
//js_binary:test5_cjs [k8-fastbuild]                                                                  58ms
//js_binary:test5_mjs [k8-fastbuild]                                                                  53ms
//js_binary:test6 [k8-fastbuild]                                                                      63ms
//js_binary:test6_alt [k8-fastbuild]                                                                  37ms
//js_binary:test8 [k8-fastbuild]                                                                      33ms
//js_binary:test_cjs [k8-fastbuild]                                                                   88ms
//js_binary:test_exitcode [k8-fastbuild]                                                              36ms
//js_binary:test_js_binary_under_custom_rule [k8-fastbuild]                                           37ms
//js_binary:test_js_binary_under_custom_rule_local [k8-fastbuild]                                     65ms
//js_binary:test_js_binary_under_genrule_cjs [k8-fastbuild]                                           61ms
//js_binary:test_js_binary_under_genrule_mjs [k8-fastbuild]                                           36ms
//js_binary:test_js_binary_under_js_run_binary_cjs [k8-fastbuild]                                     74ms
//js_binary:test_js_binary_under_js_run_binary_local_cjs [k8-fastbuild]                               41ms
//js_binary:test_js_binary_under_js_run_binary_local_mjs [k8-fastbuild]                               60ms
//js_binary:test_js_binary_under_js_run_binary_mjs [k8-fastbuild]                                     41ms
//js_binary:test_js_binary_under_js_run_binary_no_copy_data_to_bin [k8-fastbuild]                     84ms
//js_binary:test_mjs [k8-fastbuild]                                                                   136ms
//js_binary:test_stderr [k8-fastbuild]                                                                69ms
//js_binary:test_stdout [k8-fastbuild]                                                                41ms
//js_lib_pkg/b:test_each_target [k8-fastbuild]                                                        93ms
//js_lib_pkg/b:test_parent_target [k8-fastbuild]                                                      90ms
//js_library/two:two_test [k8-fastbuild]                                                              84ms
//linked_consumer:direct [k8-fastbuild]                                                               101ms
//linked_consumer:pkg [k8-fastbuild]                                                                  96ms
//linked_consumer:sources_test [k8-fastbuild]                                                         86ms
//linked_consumer:types_test [k8-fastbuild]                                                           73ms
//linked_empty_node_modules:test [k8-fastbuild]                                                       54ms
//macro:test_all [k8-fastbuild]                                                                       480ms
//macro:test_cjs [k8-fastbuild]                                                                       583ms
//macro:test_esm [k8-fastbuild]                                                                       642ms
//macro:test_js [k8-fastbuild]                                                                        1s
//nextjs:next_build_test [k8-fastbuild]                                                               40ms
//nextjs:write_next_links_defs_test [k8-fastbuild]                                                    130ms
//npm_deps/patches:patches_update_test [k8-fastbuild]                                                 127ms
//npm_deps:circular_deps_build_test [k8-fastbuild]                                                    90ms
//npm_deps:rollup_version_test [k8-fastbuild]                                                         166ms
//npm_deps:test1 [k8-fastbuild]                                                                       83ms
//npm_deps:test10_cjs [k8-fastbuild]                                                                  197ms
//npm_deps:test10_mjs [k8-fastbuild]                                                                  250ms
//npm_deps:test11_cjs [k8-fastbuild]                                                                  155ms
//npm_deps:test11_mjs [k8-fastbuild]                                                                  195ms
//npm_deps:test3 [k8-fastbuild]                                                                       111ms
//npm_deps:test4 [k8-fastbuild]                                                                       130ms
//npm_deps:test5 [k8-fastbuild]                                                                       51ms
//npm_deps:test5_alt [k8-fastbuild]                                                                   58ms
//npm_deps:test6 [k8-fastbuild]                                                                       120ms
//npm_deps:test7_a [k8-fastbuild]                                                                     141ms
//npm_deps:test7_b_cjs [k8-fastbuild]                                                                 126ms
//npm_deps:test7_b_mjs [k8-fastbuild]                                                                 127ms
//npm_deps:test8 [k8-fastbuild]                                                                       123ms
//npm_deps:test9_cjs [k8-fastbuild]                                                                   144ms
//npm_deps:test9_mjs [k8-fastbuild]                                                                   124ms
//npm_deps:test_peer [k8-fastbuild]                                                                   242ms
//npm_deps:test_uvu_version [k8-fastbuild]                                                            227ms
//package_json_module:test [k8-fastbuild]                                                             354ms
//rspack:build_test [k8-fastbuild]                                                                    17ms
//runfiles:module_name_runfiles [k8-fastbuild]                                                        199ms
//runfiles:outer_runfiles [k8-fastbuild]                                                              182ms
//runfiles:run_outer_binary_asserts__direct_srcs [k8-fastbuild]                                       97ms
//runfiles:run_outer_binary_asserts__transitive_data [k8-fastbuild]                                   97ms
//runfiles:run_test_binary_asserts__direct_srcs [k8-fastbuild]                                        87ms
//runfiles:run_test_binary_asserts__transitive_data [k8-fastbuild]                                    109ms
//runfiles:runfiles [k8-fastbuild]                                                                    108ms
//stack_traces:stack_traces [k8-fastbuild]                                                            227ms
//stamped_package_json:stamp_test [k8-fastbuild]                                                      68ms
//vite3:build_test [k8-fastbuild]                                                                     45ms
//vite6:build_test [k8-fastbuild]                                                                     62ms
//webpack_cli:test [k8-fastbuild]                                                                     420ms
//worker:test_pi [k8-fastbuild]                                                                       94ms

Bazel 8 (Test)

examples

All tests were cache hits

83 tests (100.0%) were fully cached saving 11s.


Bazel 9 (no execroot entry point) (Test)

examples

All tests were cache hits

83 tests (100.0%) were fully cached saving 12s.


Bazel 9 (Test)

examples

All tests were cache hits

83 tests (100.0%) were fully cached saving 12s.


Buildifier      Format

@acozzette acozzette force-pushed the use-execroot-entry-point branch 2 times, most recently from 62b523a to 810e38d Compare May 13, 2026 22:40
@acozzette acozzette marked this pull request as ready for review May 13, 2026 22:58
@acozzette acozzette marked this pull request as draft May 13, 2026 22:59
@acozzette acozzette force-pushed the use-execroot-entry-point branch 3 times, most recently from b0bcf10 to 50ba91b Compare May 15, 2026 19:20
@acozzette acozzette marked this pull request as ready for review May 15, 2026 20:55
@acozzette acozzette requested a review from jbedard May 15, 2026 20:55
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e6ed12806e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread contrib/nextjs/defs.bzl Outdated
Comment thread js/private/test/js_run_devserver/BUILD.bazel Outdated
@jbedard
Copy link
Copy Markdown
Member

jbedard commented May 18, 2026

I think this needs more docs in the js_run_binary docstring as well as maybe in a README or something like that?

Can we explain how this helps with cross-platform builds and avoids duplicating runfiles, avoids the optionDependencies bug etc, how we may switch the default in rules_js v4 etc...?

@acozzette acozzette force-pushed the use-execroot-entry-point branch from 2b6f2cc to 7873349 Compare May 19, 2026 14:35
@acozzette
Copy link
Copy Markdown
Contributor Author

I updated the docstring and also added those details to docs/use_execroot_entry_point.md.

Comment thread docs/use_execroot_entry_point.md Outdated
entry point used is the one in that output tree (the "execroot entry point"),
rather than the copy inside the runfiles symlink tree. With everything
consolidated in `bazel-out/<target-cfg>/bin/`, Node.js sees a single
`node_modules` tree. This is the right choice for Next.js for two reasons:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why bring up Next.js at this point? We were talking about generic bazel/node/node_modules and suddenly Next.js is mentioned.

Can we remain generic and just use Nextjs as an example in one sentence at the end of the paragraph?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, the info about Next.js seems very abrupt. I tweaked things to cut down on the detail a little bit and make it clear that Next.js is just one example.

acozzette and others added 8 commits May 20, 2026 19:04
This change introduces the flag
`--@aspect_rules_js//js:use_execroot_entry_point`, which controls the default
behavior of the `use_execroot_entry_point` option on `js_run_binary` and
`js_run_devserver`.

We could like to recommend moving away from enabling
`use_execroot_entry_point`, and this flag provides an easy way to do that at a
global level, while still making it possible to override that on specific
targets if necessary.

I also added CI test runs with
`--@aspect_rules_js//js:use_execroot_entry_point=False` so that we have good
test coverage of both modes. This required explicitly setting
`use_execroot_entry_point` on some targets that only work with one more or the
other.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@acozzette acozzette force-pushed the use-execroot-entry-point branch from 76c8f7d to 79c5671 Compare May 21, 2026 02:19
@acozzette
Copy link
Copy Markdown
Contributor Author

I realized while working on #2853 that there's really no problem with using use_execroot_entry_point = True on js_run_devserver, so I now think we should just leave that option alone. I reverted the parts of this PR that touched js_run_devserver.

@jbedard
Copy link
Copy Markdown
Member

jbedard commented May 21, 2026

Can you outline why it's not a problem there?

That means js_run_devserver(use_execroot_entry_point=True) by default still instead of None and the config option?

@acozzette
Copy link
Copy Markdown
Contributor Author

js_run_devserver always builds everything for the target platform, so as far as I can tell there's no real risk of building for the wrong platform or mixing code built for different platforms.

So for js_run_devserver it should be fine to keep use_execroot_entry_point = True as the default.

@jbedard
Copy link
Copy Markdown
Member

jbedard commented May 21, 2026

Would that conflict with our goal of making use_execroot_entry_point = False by default though? Even when exec==target does it not have some minor side-effects that we'd prefer were equal in all rules?

@acozzette
Copy link
Copy Markdown
Contributor Author

I don't really think so. Since bazel run doesn't use a sandbox, when you run a js_run_devserver you end up with sources both in the runfiles and directly in the execroot. So there's no extra hoisting happening, and all the sources are built for the same platform. I think there would be some benefit to making the option False by default everywhere, but to me the disruption just doesn't seem worth it in the case of js_run_devserver.

@@ -0,0 +1,71 @@
# use_execroot_entry_point
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe in a followup PR, but currently nothing actually links to this doc? Maybe #2852 needs to solve that as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true, nothing links to this yet. Maybe in a followup I should bring back docs/README.md and point to the new file as part of fixing #2852?

Comment thread docs/use_execroot_entry_point.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants