Skip to content

Replace module.{execution_platforms,toolchains}_to_register with register_{execution_platforms,toolchains} #15829

@Wyverald

Description

@Wyverald

Currently a MODULE.bazel file might look like this:

module(
  name = "foo",
  version = "2.0",
  toolchains_to_register = ["@toolchain_repo//:toolchain"],
)

ext = use_extension("//:extensions.bzl", "ext")
ext.some_tag()
use_repo(ext, "toolchain_repo")

The toolchains_to_register values way precede the definition of the used repo (toolchain_repo). If we had a register_toolchains API, we could request to register the toolchain after the use_repo call instead, which is easier to read and maintain.

This change should have absolutely no impact on the behavior of toolchain/execution platform registration.

Metadata

Metadata

Assignees

Labels

P2We'll consider working on this in future. (Assignee optional)area-BzlmodBzlmod-specific PRs, issues, and feature requeststeam-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.type: feature request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions