Skip to content

feat: add flag controlling the default for use_execroot_entry_point#2837

Open
acozzette wants to merge 8 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 8 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
//:npm_link_targets_node_modules_build_test [k8-fastbuild]                                               26ms
//js/private/coverage:coverage_checked_test [k8-fastbuild]                                               50ms
//js/private/node-patches:checked_in_compile_test [k8-fastbuild]                                         62ms
//js/private/test/coverage:fail [k8-fastbuild]                                                           119ms
//js/private/test/create_launcher:test [k8-fastbuild]                                                    74ms
//js/private/test/data:extract-js_library-srcs-data [k8-fastbuild]                                       26ms
//js/private/test/data:extract-write-js_library-data [k8-fastbuild]                                      35ms
//js/private/test/data:extract-write-js_library-srcs [k8-fastbuild]                                      56ms
//js/private/test/data:from-filegroup-srcs [k8-fastbuild]                                                121ms
//js/private/test/data:from-js_run_binary-srcs [k8-fastbuild]                                            109ms
//js/private/test/data:from-parent-js_library-data [k8-fastbuild]                                        122ms
//js/private/test/data:source-data-execpath [k8-fastbuild]                                               96ms
//js/private/test/fixed_args:args_test [k8-fastbuild]                                                    65ms
//js/private/test/image/non_ascii:assert_custom_layer_groups_test_app_test [k8-fastbuild]                37ms
//js/private/test/image/non_ascii:assert_custom_layer_groups_test_node_modules_test [k8-fastbuild]       47ms
//js/private/test/image/non_ascii:assert_custom_layer_groups_test_node_test [k8-fastbuild]               36ms
//js/private/test/image:assert_custom_layers_nomatch_test_node_test [k8-fastbuild]                       54ms
//js/private/test/image:assert_custom_layers_nomatch_test_package_store_1p_test [k8-fastbuild]           46ms
//js/private/test/image:assert_custom_owner_test_node_modules_test [k8-fastbuild]                        57ms
//js/private/test/image:assert_custom_owner_test_package_store_3p_test [k8-fastbuild]                    49ms
//js/private/test/image:assert_default_test_app_test [k8-fastbuild]                                      68ms
//js/private/test/image:assert_default_test_node_test [k8-fastbuild]                                     43ms
//js/private/test/image:assert_regex_edge_cases_test_package_store_1p_test [k8-fastbuild]                46ms
//js/private/test/js_binary_sh:BAZEL_PACKAGE_test [k8-fastbuild]                                         116ms
//js/private/test/js_binary_sh:BAZEL_TARGET_NAME_test [k8-fastbuild]                                     71ms
//js/private/test/js_binary_sh:JS_BINARY__BINDIR_test [k8-fastbuild]                                     68ms
//js/private/test/js_binary_sh:JS_BINARY__PACKAGE_test [k8-fastbuild]                                    87ms
//js/private/test/js_binary_sh:JS_BINARY__TARGET_NAME_test [k8-fastbuild]                                83ms
//js/private/test/js_binary_sh:JS_BINARY__TARGET_test [k8-fastbuild]                                     72ms
//js/private/test/js_binary_sh:env_json_encode_launcher_escaped [k8-fastbuild]                           75ms
//js/private/test/js_binary_sh:env_json_obj_value [k8-fastbuild]                                         87ms
//js/private/test/js_binary_sh:regexy-args [k8-fastbuild]                                                28ms
//js/private/test/js_binary_sh:regexy-args-1 [k8-fastbuild]                                              102ms
//js/private/test/js_binary_sh:regexy-args-2 [k8-fastbuild]                                              119ms
//js/private/test/js_run_binary:linux_target_platform_test [k8-fastbuild]                                93ms
//js/private/test/js_run_binary:macos_target_platform_test [k8-fastbuild]                                81ms
//js/private/test/js_run_binary:target_cfg_test [k8-fastbuild]                                           47ms
//js/private/test/js_run_binary:windows_target_platform_test [k8-fastbuild]                              73ms
//js/private/test/no_copy_to_bin:no_copy_to_bin_test [k8-fastbuild]                                      107ms
//js/private/test/node-patches:escape_nodejs_test [k8-fastbuild]                                         104ms
//js/private/test/node-patches:lstat_node20_cjs_test [k8-fastbuild]                                      139ms
//js/private/test/node-patches:lstat_node20_test [k8-fastbuild]                                          189ms
//js/private/test/node-patches:lstat_nodejs_cjs_test [k8-fastbuild]                                      195ms
//js/private/test/node-patches:lstat_nodejs_test [k8-fastbuild]                                          159ms
//js/private/test/node-patches:opendir_node22_test [k8-fastbuild]                                        196ms
//js/private/test/node-patches:opendir_node24_cjs_test [k8-fastbuild]                                    236ms
//js/private/test/node-patches:readlink_node20_cjs_test [k8-fastbuild]                                   155ms
//js/private/test/node-patches:readlink_node20_test [k8-fastbuild]                                       215ms
//js/private/test/node-patches:realpath_node20_test [k8-fastbuild]                                       280ms
//js/private/test/node-patches:realpath_node24_cjs_test [k8-fastbuild]                                   162ms
//js/private/test/node-patches:realpath_nodejs_test [k8-fastbuild]                                       214ms
//js/private/test/node-patches:spawn_test_node22 [k8-fastbuild]                                          678ms
//js/private/test/node-patches:spawn_test_nodejs [k8-fastbuild]                                          736ms
//js/private/test/proto:cross_package_dep_fail_test [k8-fastbuild]                                       70ms
//js/private/test:data_in_runfiles_test [k8-fastbuild]                                                   37ms
//js/private/test:explicit_types_test [k8-fastbuild]                                                     64ms
//js/private/test:main_toolchain_20 [k8-fastbuild]                                                       86ms
//js/private/test:main_toolchain_22 [k8-fastbuild]                                                       122ms
//js/private/test:run_environment_info_tests_binary_env_test [k8-fastbuild]                              43ms
//js/private/test:run_environment_info_tests_binary_no_env_test [k8-fastbuild]                           37ms
//js/private/test:run_environment_info_tests_test_both_test [k8-fastbuild]                               61ms
//js/private/test:run_environment_info_tests_test_inherit_only_test [k8-fastbuild]                       54ms
//js/private/test:transitive_type_deps_test [k8-fastbuild]                                               53ms
//js/private/watch:watch_checked_1_test [k8-fastbuild]                                                   55ms
//npm/private/lifecycle/min:write_min_test [k8-fastbuild]                                                25ms
//npm/private/test/npm_package:test_pkg_2 [k8-fastbuild]                                                 39ms
//npm/private/test/npm_package:test_pkg_3 [k8-fastbuild]                                                 57ms
//npm/private/test/npm_package:test_pkg_4 [k8-fastbuild]                                                 114ms
//npm/private/test/npm_package:test_pkg_with_node_modules [k8-fastbuild]                                 46ms
//npm/private/test:bin_test [k8-fastbuild]                                                               648ms
//npm/private/test:node_modules_test [k8-fastbuild]                                                      22ms
//npm/private/test:npm_auth_tests_test_5 [k8-fastbuild]                                                  51ms
//npm/private/test:npm_auth_tests_test_6 [k8-fastbuild]                                                  52ms
//npm/private/test:test_generated_pkg_json___rollup-target_copy_srcs_to_bin_tagged_manual [k8-fastbuild] 38ms
//npm/private/test:test_generated_pkg_json___rollup-target_js_info_files_tagged_manual [k8-fastbuild]    55ms
//npm/private/test:test_generated_pkg_json_only_expected_methods [k8-fastbuild]                          70ms
//npm/private/test:test_generated_pkg_json_only_expected_properties [k8-fastbuild]                       58ms
//npm/private/test:test_npm_package_visibility_test_0 [k8-fastbuild]                                     76ms
//npm/private/test:test_npm_package_visibility_test_11 [k8-fastbuild]                                    37ms
//npm/private/test:test_npm_package_visibility_test_12 [k8-fastbuild]                                    33ms
//npm/private/test:test_npm_package_visibility_test_4 [k8-fastbuild]                                     105ms
//npm/private/test:test_npm_package_visibility_test_5 [k8-fastbuild]                                     88ms
//npm/private/test:test_npm_package_visibility_test_9 [k8-fastbuild]                                     79ms
//npm/private/test:test_npmrc_test_0 [k8-fastbuild]                                                      88ms
//npm/private/test:test_npmrc_test_4 [k8-fastbuild]                                                      52ms
//npm/private/test:test_npmrc_test_6 [k8-fastbuild]                                                      43ms
//npm/private/test:test_pnpm_test_1 [k8-fastbuild]                                                       34ms
//npm/private/test:test_pnpm_test_2 [k8-fastbuild]                                                       44ms
//npm/private/test:test_pnpm_test_3 [k8-fastbuild]                                                       24ms
//npm/private/test:test_pnpm_test_5 [k8-fastbuild]                                                       26ms
//npm/private/test:test_pnpm_test_8 [k8-fastbuild]                                                       67ms
//npm/private/test:test_translate_lock_test_2 [k8-fastbuild]                                             43ms
//npm/private/test:test_translate_lock_test_3 [k8-fastbuild]                                             57ms
//npm/private/test:test_translate_lock_test_4 [k8-fastbuild]                                             40ms
//npm/private/test:test_utils_test_1 [k8-fastbuild]                                                      49ms
//npm/private/test:write_npm_translate_lock_0_test [k8-fastbuild]                                        126ms
//npm/private/test:write_npm_translate_lock_1_test [k8-fastbuild]                                        154ms
//npm/private/test:write_npm_translate_lock_3_test [k8-fastbuild]                                        130ms
//npm/private/test:write_npm_translate_lock_5_test [k8-fastbuild]                                        83ms
//npm/private/test:write_npm_translate_lock_8_test [k8-fastbuild]                                        86ms
+ 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]                                                                           144ms
//:jasmine_test [k8-fastbuild]                                                                           173ms
//:node_modules_test [k8-fastbuild]                                                                      46ms
//:other_module_binary_test [k8-fastbuild]                                                               96ms
//:other_module_linked_packages [k8-fastbuild]                                                           27ms
//:other_module_run_binary_test [k8-fastbuild]                                                           56ms
//:test [k8-fastbuild]                                                                                   122ms

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                                                                                  20ms

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]                                                                                   46ms
//:write_npm_translate_lock_bzlmod_test [k8-fastbuild]                                                   106ms

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]                                                               81ms
//:test [k8-fastbuild]                                                                                   76ms
@@workspace~//:js_binary_chdir_test [k8-fastbuild]                                                       104ms
@@workspace~//:js_test_chdir_test [k8-fastbuild]                                                         140ms

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

Buildkite build #12748 is running...


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]                                                                            137ms
//cjs:package_store_targets_test [k8-fastbuild]                                                          68ms
//esm/src:test [k8-fastbuild]                                                                            141ms
//esm:package_store_targets_test [k8-fastbuild]                                                          70ms

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]                                                                           120ms
//root:package_store_targets_test [k8-fastbuild]                                                         56ms

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

Buildkite build #12748 is running...


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

Waiting for runner...


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

3 test targets passed

Targets
//:test [k8-fastbuild]                                                                                   17ms
//:write_npm_translate_lock_defs_0_test [k8-fastbuild]                                                   54ms
//:write_npm_translate_lock_defs_1_test [k8-fastbuild]                                                   68ms

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]                                                                                   31ms
//:write_npm_translate_lock_bzlmod_test [k8-fastbuild]                                                   164ms

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

Buildkite build #12748 is running...


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                                                                                              33ms
//app2:test                                                                                              32ms

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

All tests were cache hits

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


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                                                                                              21ms

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]                                                                      30ms
//:test [k8-fastbuild]                                                                                   91ms
//:utils_test [k8-fastbuild]                                                                             76ms
//:write_npm_translate_lock_bzlmod_test [k8-fastbuild]                                                   74ms

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

Waiting for runner...


Bazel 7 (Test)

e2e/npm_translate_lock_subdir_patch

1 test target passed

Targets
//subdir:test                                                                                            52ms

Bazel 8 (Test)

e2e/npm_translate_lock_subdir_patch

All tests were cache hits

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


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

All tests were cache hits

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


Bazel 7 (Test)

e2e/npm_translate_package_lock

Buildkite build #12748 is running...


Bazel 8 (Test)

e2e/npm_translate_package_lock

Buildkite build #12748 is running...


Bazel 9 (no execroot entry point) (Test)

e2e/npm_translate_package_lock

Buildkite build #12748 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

Buildkite build #12748 is running...


Bazel 8 (Test)

e2e/npm_translate_yarn_lock

Buildkite build #12748 is running...


Bazel 9 (no execroot entry point) (Test)

e2e/npm_translate_yarn_lock

Buildkite build #12748 is running...


Bazel 9 (Test)

e2e/npm_translate_yarn_lock

All tests were cache hits

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


Bazel 7 (Test)

e2e/output_paths

2 test targets passed

Targets
//:test [k8-fastbuild]                                                                                   87ms
//:test_lessc--help [k8-fastbuild]                                                                       36ms

Bazel 8 (Test)

e2e/output_paths

Waiting for runner...


Bazel 9 (no execroot entry point) (Test)

e2e/output_paths

Buildkite build #12748 is running...


Bazel 9 (Test)

e2e/output_paths

Buildkite build #12748 is running...


Bazel 7 (Test)

e2e/patch_from_repo

Buildkite build #12748 is running...


Bazel 7 (Test)

e2e/pnpm_lockfiles

Buildkite build #12748 is running...


Bazel 8 (Test)

e2e/pnpm_lockfiles

Buildkite build #12748 is running...


Bazel 9 (no execroot entry point) (Test)

e2e/pnpm_lockfiles

Buildkite build #12748 is running...


Bazel 9 (Test)

e2e/pnpm_lockfiles

All tests were cache hits

17 tests (100.0%) were fully cached saving 1s.


Bazel 7 (Test)

e2e/pnpm_repo_install

4 test targets passed

Targets
//:pnpm_install_test                                                                                     1s
//:pnpm_install_test_v10                                                                                 1s
//:pnpm_install_test_v11                                                                                 1s
//:pnpm_patch_test                                                                                       56ms

Bazel 8 (Test)

e2e/pnpm_repo_install

All tests were cache hits

4 tests (100.0%) were fully cached saving 5s.


Bazel 9 (no execroot entry point) (Test)

e2e/pnpm_repo_install

All tests were cache hits

4 tests (100.0%) were fully cached saving 4s.


Bazel 9 (Test)

e2e/pnpm_repo_install

Buildkite build #12748 is running...


Bazel 7 (Test)

e2e/pnpm_workspace

Waiting for runner...


Bazel 8 (Test)

e2e/pnpm_workspace

Buildkite build #12748 is running...


Bazel 9 (no execroot entry point) (Test)

e2e/pnpm_workspace

Buildkite build #12748 is running...


Bazel 9 (Test)

e2e/pnpm_workspace

Buildkite build #12748 is running...


Bazel 7 (Test)

e2e/pnpm_workspace_deps

Waiting for runner...


Bazel 8 (Test)

e2e/pnpm_workspace_deps

Buildkite build #12748 is running...


Bazel 9 (no execroot entry point) (Test)

e2e/pnpm_workspace_deps

Buildkite build #12748 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]                                                                              491ms
//:repos_test [k8-fastbuild]                                                                             76ms
//:vendored [k8-fastbuild]                                                                               123ms
//app/a:aspect_test_a_bin_test [k8-fastbuild]                                                            130ms
//app/a:npm_link_targets_node_modules_build_test [k8-fastbuild]                                          66ms
//app/a:npm_link_targets_test [k8-fastbuild]                                                             99ms
//app/a:test [k8-fastbuild]                                                                              208ms
//app/b:aliases [k8-fastbuild]                                                                           129ms
//app/b:test [k8-fastbuild]                                                                              116ms
//app/c:aspect_test_a_bin_test [k8-fastbuild]                                                            113ms
//app/c:test [k8-fastbuild]                                                                              167ms
//app/d:test [k8-fastbuild]                                                                              103ms
//lib/a:vendored [k8-fastbuild]                                                                          71ms
//lib/b:aliases [k8-fastbuild]                                                                           83ms
//lib/d:aliases [k8-fastbuild]                                                                           98ms

Bazel 8 (Test)

e2e/pnpm_workspace_rerooted

Buildkite build #12748 is running...


Bazel 9 (no execroot entry point) (Test)

e2e/pnpm_workspace_rerooted

Buildkite build #12748 is running...


Bazel 9 (Test)

e2e/pnpm_workspace_rerooted

Waiting for runner...


Bazel 7 (Test)

e2e/protobuf-es

Buildkite build #12748 is running...


Bazel 8 (Test)

e2e/protobuf-es

Buildkite build #12748 is running...


Bazel 9 (no execroot entry point) (Test)

e2e/protobuf-es

All tests were cache hits

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


Bazel 9 (Test)

e2e/protobuf-es

Buildkite build #12748 is running...


Bazel 7 (Test)

e2e/protobuf-google

Buildkite build #12748 is running...


Bazel 8 (Test)

e2e/protobuf-google

Waiting for runner...


Bazel 9 (no execroot entry point) (Test)

e2e/protobuf-google

Buildkite build #12748 is running...


Bazel 9 (Test)

e2e/protobuf-google

Waiting for runner...


Bazel 7 (Test)

e2e/repo_mapping

Buildkite build #12748 is running...


Bazel 8 (Test)

e2e/repo_mapping

Buildkite build #12748 is running...


Bazel 9 (Test)

e2e/repo_mapping

Waiting for runner...


Bazel 7 (Test)

e2e/vendored_node

Waiting for runner...


Bazel 8 (Test)

e2e/vendored_node

Buildkite build #12748 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

1 test target passed

Targets
//:test                                                                                                  23ms

Bazel 8 (Test)

e2e/vendored_tarfile

Waiting for runner...


Bazel 9 (no execroot entry point) (Test)

e2e/vendored_tarfile

Waiting for runner...


Bazel 9 (Test)

e2e/vendored_tarfile

Buildkite build #12748 is running...


Bazel 7 (Test)

e2e/verify_patches

Waiting for runner...


Bazel 8 (Test)

e2e/verify_patches

Waiting for runner...


Bazel 9 (no execroot entry point) (Test)

e2e/verify_patches

All tests were cache hits

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


Bazel 9 (Test)

e2e/verify_patches

Waiting for runner...


Bazel 7 (Test)

examples

Waiting for runner...


Bazel 8 (Test)

examples

Buildkite build #12748 is running...


Bazel 9 (no execroot entry point) (Test)

examples

Buildkite build #12748 is running...


Bazel 9 (Test)

examples

Buildkite build #12748 is running...


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?

expect inputs and outputs in the same directory tree or that execute
target-platform code during the build, in which case `True` is required.

To disable `use_execroot_entry_point` globally, pass the build flag:
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.

It doesn't disable it globally though, it just changes the default?

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