| diff --git a/MODULE.bazel b/MODULE.bazel |
| index 051722c99..2c559f87d 100644 |
| --- a/MODULE.bazel |
| +++ b/MODULE.bazel |
| @@ -89,6 +89,11 @@ bazel_dep( |
| repo_name = "proto_bazel_features", |
| ) |
| |
| +bazel_dep( |
| + name = "rules_shell", |
| + version = "0.1.1", |
| +) |
| + |
| # Proto toolchains |
| register_toolchains("//bazel/private/toolchains:all") |
| |
| diff --git a/build_defs/internal_shell.bzl b/build_defs/internal_shell.bzl |
| index 91628a5e5..d15cf29fb 100644 |
| --- a/build_defs/internal_shell.bzl |
| +++ b/build_defs/internal_shell.bzl |
| @@ -3,6 +3,9 @@ Internal tools to migrate shell commands to Bazel as an intermediate step |
| to wider Bazelification. |
| """ |
| |
| +load("@rules_shell//shell:sh_binary.bzl", "sh_binary") |
| +load("@rules_shell//shell:sh_test.bzl", "sh_test") |
| + |
| def inline_sh_binary( |
| name, |
| srcs = [], |
| @@ -41,7 +44,7 @@ def inline_sh_binary( |
| testonly = kwargs["testonly"] if "testonly" in kwargs else None, |
| ) |
| |
| - native.sh_binary( |
| + sh_binary( |
| name = name, |
| srcs = [name + "_genrule"], |
| data = srcs + tools + deps, |
| @@ -86,7 +89,7 @@ def inline_sh_test( |
| testonly = kwargs["testonly"] if "testonly" in kwargs else None, |
| ) |
| |
| - native.sh_test( |
| + sh_test( |
| name = name, |
| srcs = [name + "_genrule"], |
| data = srcs + tools + deps, |
| diff --git a/conformance/defs.bzl b/conformance/defs.bzl |
| index 3a7d1d6cb..42917c9df 100644 |
| --- a/conformance/defs.bzl |
| +++ b/conformance/defs.bzl |
| @@ -3,6 +3,8 @@ |
| PLEASE DO NOT DEPEND ON THE CONTENTS OF THIS FILE, IT IS UNSTABLE. |
| """ |
| |
| +load("@rules_shell//shell:sh_test.bzl", "sh_test") |
| + |
| def conformance_test( |
| name, |
| testee, |
| @@ -31,7 +33,7 @@ def conformance_test( |
| if maximum_edition: |
| args = args + ["--maximum_edition %s" % maximum_edition] |
| |
| - native.sh_test( |
| + sh_test( |
| name = name, |
| srcs = ["//conformance:bazel_conformance_test_runner.sh"], |
| data = [testee] + failure_lists + [ |