-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Starlarkify sh_binary
and sh_test
#23732
Conversation
f958b01
to
a68d2b1
Compare
f636a77
to
629fc59
Compare
@comius I had to disable doc generation on this PR for CI to get anywhere (see the last commit). Is there anything I need to do to get references such as |
dd24d0c
to
0341a0f
Compare
@@ -90,7 +90,7 @@ working directory. If run directly (using the <code>standalone</code> strategy), | |||
results, including caching policies and environment variables. Tests generally need to be run | |||
after the build is complete and on the target architecture, whereas genrules are executed during | |||
the build and on the exec architecture (the two may be different). If you need a general purpose | |||
testing rule, use <a href="${link sh_test}"><code>sh_test</code></a>. | |||
testing rule, use <a href="shell#sh_test"><code>sh_test</code></a>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't get ${link sh_test}
to work and dropped it since it only occurs a single time in the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for sh_toolchain and the repo rule! Thanks for the effort!
Could you please rebase this? |
Migrated to https://github.com/bazelbuild/rules_shell. |
The native
sh_{binary,test}
incorrectly used the execution platform instead of the target platform to determine whether to use a launcher. The starlarkified rule obtains the launcher from thesh_toolchain
, which now has one instance registered for each common Bazel platform. Users can add additional toolchains as needed.Fixes #23658
RELNOTES:
sh_binary
andsh_test
can now be built for Windows on non-Windows execution platforms (and vice versa).