Skip to content

feat: RUNFILES_DIR compatibility #2297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rbosetti
Copy link

@rbosetti rbosetti commented Aug 4, 2025

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

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.
@CLAassistant
Copy link

CLAassistant commented Aug 4, 2025

CLA assistant check
All committers have signed the CLA.

Copy link

aspect-workflows bot commented Aug 4, 2025

Test

⚠️ 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]                                      🔗

💡 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

@rbosetti rbosetti marked this pull request as draft August 4, 2025 21:38
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.

[Bug]: RUNFILES_DIR should be in the environment of a JS binary
2 participants