rules_js icon indicating copy to clipboard operation
rules_js copied to clipboard

feat: RUNFILES_DIR compatibility

Open rbosetti opened this issue 4 months ago • 2 comments

Add this environment variable in line with https://docs.google.com/document/d/e/2PACX-1vSDIrFnFvEYhKsCMdGdD40wZRBX3m3aZ5HhVj4CtHPmiXKDCxioTUbYsDydjKtFDAzER5eg7OjJWs3V/pub

For compatibility with existing users and workarounds, the variable is conditionally exported.

Resolves #1180

Changes are visible to end-users: yes

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

Test plan

  • Manual testing; successful invocation on Mac and Linux. js_binary invokes a go_binary that relies on transitive runfiles from a sh_binary

rbosetti avatar Aug 04 '25 20:08 rbosetti

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Aug 04 '25 20:08 CLAassistant

Test

:warning: Buildkite build #8981 failed.

Failed tests (5)
//js/private/test/image/non_ascii:assert_custom_layer_groups_test_app_test [k8-fastbuild] 🔗
//js/private/test/image:assert_custom_owner_test_app_test [k8-fastbuild]                  🔗
//js/private/test/image:assert_default_test_app_test [k8-fastbuild]                       🔗
//js/private/test/image:assert_regex_edge_cases_test_app_test [k8-fastbuild]              🔗
//js/private/test:write_launcher_test [k8-fastbuild]                                      🔗

:bulb: To reproduce the test failures, run

bazel test //js/private/test/image:assert_regex_edge_cases_test_app_test //js/private/test:write_launcher_test //js/private/test/image:assert_custom_owner_test_app_test //js/private/test/image/non_ascii:assert_custom_layer_groups_test_app_test //js/private/test/image:assert_default_test_app_test

Test

e2e/bzlmod

2 test targets passed

Targets
//:jasmine_test [k8-fastbuild]                                                          274ms
//:test [k8-fastbuild]                                                                  197ms

Total test execution time was 471ms. 3 tests (60.0%) were fully cached saving 96ms.


Test

e2e/gyp_no_install_script

1 test target passed

Targets
//:test [k8-fastbuild]                                                                  82ms

Total test execution time was 82ms. 1 test (50.0%) was fully cached saving 113ms.


Test

e2e/js_image_oci

1 test target passed

Targets
//src:image_test [k8-fastbuild]                                                         8s

Test

e2e/npm_link_package

2 test targets passed

Targets
//:aspect_test_a_bin_test [k8-fastbuild]                                                138ms
//src:test [k8-fastbuild]                                                               235ms

Total test execution time was 373ms. 1 test (33.3%) was fully cached saving 174ms.


Test

e2e/npm_link_package-esm

1 test target passed

Targets
//src:test [k8-fastbuild]                                                               157ms

Total test execution time was 157ms. 2 tests (66.7%) were fully cached saving 312ms.


Test

e2e/npm_translate_lock

All tests were cache hits

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


Test

e2e/npm_translate_lock_empty

All tests were cache hits

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


Test

e2e/npm_translate_lock_multi

All tests were cache hits

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


Test

e2e/npm_translate_lock_partial_clone

All tests were cache hits

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


Test

e2e/npm_translate_lock_replace_packages

1 test target passed

Targets
//:test [k8-fastbuild]                                                                  95ms

Total test execution time was 95ms. 2 tests (66.7%) were fully cached saving 141ms.


Test

e2e/npm_translate_lock_subdir_patch

1 test target passed

Targets
//subdir:test                                                                           105ms

Test

e2e/npm_translate_package_lock

All tests were cache hits

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


Test

e2e/npm_translate_yarn_lock

All tests were cache hits

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


Test

e2e/package_json_module

1 test target passed

Targets
//:test                                                                                 274ms

Test

e2e/pnpm_lockfiles

11 test targets passed

Targets
//cases/versionless-patch-v9:versionless_patch_test [k8-fastbuild]                      135ms
//v101:aliases-test [k8-fastbuild]                                                      176ms
//v101:patch-test [k8-fastbuild]                                                        153ms
//v54:aliases-test [k8-fastbuild]                                                       236ms
//v54:patch-test [k8-fastbuild]                                                         172ms
//v60:aliases-test [k8-fastbuild]                                                       183ms
//v60:patch-test [k8-fastbuild]                                                         162ms
//v61:aliases-test [k8-fastbuild]                                                       265ms
//v61:patch-test [k8-fastbuild]                                                         174ms
//v90:aliases-test [k8-fastbuild]                                                       193ms
//v90:patch-test [k8-fastbuild]                                                         134ms

Total test execution time was 2s. 41 tests (78.8%) were fully cached saving 3s.


Test

e2e/pnpm_workspace

6 test targets passed

Targets
//app/a:aspect_test_a_bin_test [k8-fastbuild]                                           256ms
//app/a:test [k8-fastbuild]                                                             357ms
//app/b:test [k8-fastbuild]                                                             108ms
//app/c:aspect_test_a_bin_test [k8-fastbuild]                                           452ms
//app/c:test [k8-fastbuild]                                                             237ms
//app/d:test [k8-fastbuild]                                                             200ms

Total test execution time was 2s. 9 tests (60.0%) were fully cached saving 1s.


Test

e2e/pnpm_workspace_rerooted

6 test targets passed

Targets
//app/a:aspect_test_a_bin_test [k8-fastbuild]                                           433ms
//app/a:test [k8-fastbuild]                                                             322ms
//app/b:test [k8-fastbuild]                                                             162ms
//app/c:aspect_test_a_bin_test [k8-fastbuild]                                           251ms
//app/c:test [k8-fastbuild]                                                             395ms
//app/d:test [k8-fastbuild]                                                             464ms

Total test execution time was 2s. 9 tests (60.0%) were fully cached saving 1s.


Test

e2e/repo_mapping

1 test target passed

Targets
//:test [k8-fastbuild]                                                                  86ms

Total test execution time was 86ms. 2 tests (66.7%) were fully cached saving 319ms.


Test

e2e/rules_foo

1 test target passed

Targets
//foo:test [k8-fastbuild]                                                               119ms

Total test execution time was 119ms. 1 test (50.0%) was fully cached saving 24ms.


Test

e2e/runfiles

1 test target passed

Targets
//:runfiles [k8-fastbuild]                                                              106ms

Test

e2e/vendored_node

1 test target passed

Targets
//:test [k8-fastbuild]                                                                  70ms

Buildifier      Format

aspect-workflows[bot] avatar Aug 04 '25 20:08 aspect-workflows[bot]