Skip to content

refactor: update js_binary executable path to {name}_/{name}#1690

Merged
gregmagolan merged 1 commit into
2.xfrom
executable_path
May 7, 2024
Merged

refactor: update js_binary executable path to {name}_/{name}#1690
gregmagolan merged 1 commit into
2.xfrom
executable_path

Conversation

@gregmagolan

@gregmagolan gregmagolan commented May 2, 2024

Copy link
Copy Markdown
Member

Follow-up to #1586.

The trouble with the change in #1586 with the name of the executable in the output tree the same as the target name is that a target name such as test could be in a BUILD file where a subdirectory named test exists which can lead to build failures such as:

ERROR: One of the output paths 'bazel-out/k8-fastbuild/bin/foo/test' (belonging to //foo:test) and 'bazel-out/k8-fastbuild/bin/foo/test/active_file_users_test.ts' (belonging to //foo:foo) is a prefix of the other. These actions cannot be simultaneously present; please rename one of the output files or build just one of them

This change resolves that issue without bringing back the .sh suffix that #1586 was addressing.

NB: the {name}_/{name} naming scheme was copied from rules_go, which uses the same scheme for go_binary,

@aspect-workflows

aspect-workflows Bot commented May 2, 2024

Copy link
Copy Markdown

Test

All tests were cache hits

190 tests (100.0%) were fully cached saving 51s.


Test

e2e/bzlmod

All tests were cache hits

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


Test

e2e/gyp_no_install_script

All tests were cache hits

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


Test

e2e/js_image_oci

All tests were cache hits

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


Test

e2e/npm_link_package

All tests were cache hits

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


Test

e2e/npm_link_package-esm

All tests were cache hits

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


Test

e2e/npm_translate_lock

All tests were cache hits

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


Test

e2e/npm_translate_lock_empty

All tests were cache hits

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


Test

e2e/npm_translate_lock_multi

All tests were cache hits

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


Test

e2e/npm_translate_lock_partial_clone

All tests were cache hits

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


Test

e2e/npm_translate_lock_subdir_patch

All tests were cache hits

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


Test

e2e/npm_translate_package_lock

All tests were cache hits

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


Test

e2e/npm_translate_yarn_lock

All tests were cache hits

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


Test

e2e/package_json_module

All tests were cache hits

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


Test

e2e/pnpm_lockfiles

All tests were cache hits

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


Test

e2e/pnpm_workspace

All tests were cache hits

8 tests (100.0%) were fully cached saving 3s.


Test

e2e/pnpm_workspace_rerooted

All tests were cache hits

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


Test

e2e/repo_mapping

All tests were cache hits

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


Test

e2e/rules_foo

All tests were cache hits

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


Test

e2e/vendored_node

All tests were cache hits

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


Buildifier      Format

Comment thread examples/js_binary/BUILD.bazel Outdated
@gregmagolan gregmagolan requested a review from jbedard May 3, 2024 01:08
@gregmagolan gregmagolan force-pushed the executable_path branch 2 times, most recently from 24d8cc1 to 4ce6045 Compare May 3, 2024 01:10
@jbedard

jbedard commented May 3, 2024

Copy link
Copy Markdown
Member

Was this convention copied from somewhere?

@gregmagolan

gregmagolan commented May 3, 2024

Copy link
Copy Markdown
Member Author

Was this convention copied from somewhere?

Copied from rules_go

@gregmagolan gregmagolan force-pushed the executable_path branch 7 times, most recently from 8ac90e3 to b6cff3c Compare May 3, 2024 05:50
@gregmagolan gregmagolan mentioned this pull request May 6, 2024
21 tasks
@gregmagolan gregmagolan force-pushed the executable_path branch 2 times, most recently from 3d289fd to d25cec7 Compare May 6, 2024 21:05
@gregmagolan gregmagolan force-pushed the executable_path branch 8 times, most recently from 1937ccf to 804e00e Compare May 7, 2024 03:29
@gregmagolan gregmagolan merged commit 847dc2b into 2.x May 7, 2024
@gregmagolan gregmagolan deleted the executable_path branch May 7, 2024 21:46
jbedard pushed a commit to jbedard/rules_js that referenced this pull request May 14, 2024
jbedard pushed a commit to jbedard/rules_js that referenced this pull request May 16, 2024
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.

3 participants