Skip to content

testbazel: load sh_binary / sh_test from @rules_shell (prep for Bazel 9)#11996

Merged
dan-stowell merged 2 commits intomasterfrom
rules-shell-prep
Apr 24, 2026
Merged

testbazel: load sh_binary / sh_test from @rules_shell (prep for Bazel 9)#11996
dan-stowell merged 2 commits intomasterfrom
rules-shell-prep

Conversation

@dan-stowell
Copy link
Copy Markdown
Contributor

@dan-stowell dan-stowell commented Apr 24, 2026

Prep work for bumping testbazel's inner Bazel to 9.x, where sh_binary / sh_test are no longer native rules and must be loaded from @rules_shell. Warms @rules_shell in testbazel's prewarmed Bazel 8 install and updates every test-owned inline BUILD literal to load the rules explicitly, so the same BUILD content works on both Bazel 8 and 9.

dan-stowell and others added 2 commits April 24, 2026 18:28
Prep work for bumping the testbazel inner Bazel version to 9, where
sh_binary and sh_test are no longer native rules and must be loaded
from @rules_shell.

- Warm @rules_shell in the prewarmed Bazel 8 install too (it's already
  always warmed on 9+). This is what lets test-written BUILD files use
  a single form that works on both versions.
- InitModule() now unconditionally adds a bazel_dep on @rules_shell to
  the inner workspace's MODULE.bazel (if not already present).
- Update every test-owned inline BUILD literal under cli/ and
  enterprise/server/test/integration/ to load sh_binary / sh_test from
  @rules_shell.

No behavior change on Bazel 8 beyond the one extra bazel_dep in tests'
inner MODULE.bazel; fully compatible with the upcoming 9.1.0 bump.

Co-authored-by: Shelley <shelley@exe.dev>
Co-authored-by: Shelley <shelley@exe.dev>
@dan-stowell dan-stowell marked this pull request as ready for review April 24, 2026 18:43
@dan-stowell dan-stowell merged commit 2875999 into master Apr 24, 2026
11 checks passed
@dan-stowell dan-stowell deleted the rules-shell-prep branch April 24, 2026 19:02
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.

2 participants