Skip to content

Commit

Permalink
Resolve failure on bazel 4 due to usage of ctx.resolve_command
Browse files Browse the repository at this point in the history
  • Loading branch information
jheaff1 committed Nov 9, 2022
1 parent bac1869 commit eac0480
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .bazelci/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,14 @@ tasks:
platform: ubuntu1804
build_targets:
- "//..."
# experimental_enable_aggregating_middleman=False is required in bazel 4 otherwise ctx.resolve_command fails.
# This was resolved in https://github.com/bazelbuild/bazel/commit/fb1c369530bd26f9a13560c5979929a999e585e2
build_flags:
- "--experimental_enable_aggregating_middleman=False"
test_targets:
- "//..."
test_flags:
- "--experimental_enable_aggregating_middleman=False"
min_supported_version_examples:
name: "Minimum Supported Version Examples"
bazel: "4.0.0"
Expand All @@ -201,7 +207,12 @@ tasks:
min_supported_targets: &min_supported_targets
- "//..."
build_targets: *min_supported_targets
# See comment above regarding --experimental_enable_aggregating_middleman=False
build_flags:
- "--experimental_enable_aggregating_middleman=False"
test_targets: *min_supported_targets
test_flags:
- "--experimental_enable_aggregating_middleman=False"

buildifier:
version: "4.2.5"
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ Documentation for all rules and providers are available at: https://bazelbuild.g

## Bazel versions compatibility

Works with Bazel after 4.0.0 without any flags.
Works with Bazel after 4.0.0.

The following flags are required in Bazel 4.x but not Bazel 5.x or newer:

- `--experimental_enable_aggregating_middleman=False`

Note that the rules may be compatible with older versions of Bazel but support may break
in future changes as these older versions are not tested.
Expand Down

0 comments on commit eac0480

Please sign in to comment.