bazelbuild / bazelbuild/bazel

Deprecate `copy_from_rule` from exec_group

Open
#17,668 1 comment 0 reactions 1 assignee Claimed by @kotlaja View on GitHub
P2 team-Configurability team-Documentation type: documentation (cleanup)
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

**Goal**: Deprecate `copy_from_rule` parameter from exec_groups.

**Reason**: Simplification of the API since it’s not widely spread.

In case you’re using it and you have a **breakage**:
1. Add toolchain types manually from the rule to the exec_group
2. Add constraints manually from the rule to the exec_group

Example:
```
custom_rule = rule(
_impl,
exec_groups = {
“test_group”: exec_group(
copy_from_rule = True,
),
},
toolchains = [“//tools/jdk:toolchain_type”, “//tools/cpp:toolchain_type”],
exec_compatible_with = “//third_party/bazel_platforms/os:linux”,
)
```
Should become:

```
custom_rule = rule(
_impl,
exec_groups = {
“test_group”: exec_group(
toolchains = [“//tools/jdk:toolchain_type”, “//tools/cpp:toolchain_type”],
exec_compatible_with = “//third_party/bazel_platforms/os:linux”,
),
},
toolchains = [“//tools/jdk:toolchain_type”, “//tools/cpp:toolchain_type”],
exec_compatible_with = “//third_party/bazel_platforms/os:linux”,
)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.