Skip to content

Deprecate copy_from_rule from exec_group #17668

@kotlaja

Description

@kotlaja

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”,
)

Metadata

Metadata

Assignees

Labels

P2We'll consider working on this in future. (Assignee optional)team-Configurabilityplatforms, toolchains, cquery, select(), config transitionsteam-DocumentationDocumentation improvements that cannot be directly linked to other team labelstype: documentation (cleanup)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions