Skip to content

Migrate sh_binary/sh_test loads for Bazel 9 compatibility#66

Open
jinfwhuang wants to merge 1 commit intofasterci:mainfrom
jinfwhuang:jin/bazel9-sh-rules
Open

Migrate sh_binary/sh_test loads for Bazel 9 compatibility#66
jinfwhuang wants to merge 1 commit intofasterci:mainfrom
jinfwhuang:jin/bazel9-sh-rules

Conversation

@jinfwhuang
Copy link
Copy Markdown
Contributor

@jinfwhuang jinfwhuang commented May 7, 2026

Bazel 9 removes the native sh_binary, sh_test, and sh_library rules; they must be loaded from @rules_shell (Bazel 9 release notes).

PR #65 already removed incompatible_use_toolchain_transition for Bazel 9, but the sh_* usages were still relying on the native (now-removed) rules. Without these load statements, consumers on Bazel 9 hit:

ERROR: name 'sh_binary' is not defined

This change improves Bazel 9 compatibility for shell rules.

Bazel 9 removes the native sh_binary, sh_test, and sh_library rules; they
must be loaded from @rules_shell. Add rules_shell as a module dependency
and add the corresponding load() statements to every BUILD file (and the
generated BUILD in the kustomize repository rule) that uses them.
@jinfwhuang jinfwhuang force-pushed the jin/bazel9-sh-rules branch from 4d9b14f to cf06976 Compare May 7, 2026 18:10
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.

1 participant