Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Wyverald opened this issue Jul 7, 2022 · 3 comments
Assignees
Labels
area-Bzlmod Bzlmod-specific PRs, issues, and feature requests P2 We'll consider working on this in future. (Assignee optional) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: feature request

Comments

@Wyverald
Copy link
Member

Wyverald commented Jul 7, 2022

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.

@Wyverald Wyverald added type: feature request P2 We'll consider working on this in future. (Assignee optional) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. area-Bzlmod Bzlmod-specific PRs, issues, and feature requests labels Jul 7, 2022
@Wyverald Wyverald self-assigned this Jul 7, 2022
copybara-service bot pushed a commit that referenced this issue Jul 8, 2022
…zel files

These are intended to replace the {execution_platforms,toolchains}_to_register attribtues on the module() directive, which are a bit harder to use since they have to be grouped up together near the top.

#15829

RELNOTES: Added new register_{execution_platforms,toolchains} directives to the MODULE.bazel file, to replace the {execution_platforms,toolchains}_to_register attributes on the module() directive.
PiperOrigin-RevId: 459714400
Change-Id: If8a25ef92ac695a3f012d54d0e189d8ae25d0833
copybara-service bot pushed a commit that referenced this issue Jul 8, 2022
#15829

PiperOrigin-RevId: 459714912
Change-Id: I70d4dfbdaab85364bf4db526e07aa80ae7eba552
@Wyverald
Copy link
Member Author

Wyverald commented Jul 8, 2022

Now we just need to migrate all existing modules in BCR: see bazelbuild/bazel-central-registry#127

fmeum pushed a commit to fmeum/bazel that referenced this issue Jul 11, 2022
…zel files

These are intended to replace the {execution_platforms,toolchains}_to_register attribtues on the module() directive, which are a bit harder to use since they have to be grouped up together near the top.

bazelbuild#15829

RELNOTES: Added new register_{execution_platforms,toolchains} directives to the MODULE.bazel file, to replace the {execution_platforms,toolchains}_to_register attributes on the module() directive.
PiperOrigin-RevId: 459714400
Change-Id: If8a25ef92ac695a3f012d54d0e189d8ae25d0833
fmeum pushed a commit to fmeum/bazel that referenced this issue Jul 11, 2022
…zel files

These are intended to replace the {execution_platforms,toolchains}_to_register attribtues on the module() directive, which are a bit harder to use since they have to be grouped up together near the top.

bazelbuild#15829

RELNOTES: Added new register_{execution_platforms,toolchains} directives to the MODULE.bazel file, to replace the {execution_platforms,toolchains}_to_register attributes on the module() directive.
PiperOrigin-RevId: 459714400
Change-Id: If8a25ef92ac695a3f012d54d0e189d8ae25d0833
fmeum pushed a commit to fmeum/bazel that referenced this issue Jul 11, 2022
…zel files

These are intended to replace the {execution_platforms,toolchains}_to_register attribtues on the module() directive, which are a bit harder to use since they have to be grouped up together near the top.

bazelbuild#15829

RELNOTES: Added new register_{execution_platforms,toolchains} directives to the MODULE.bazel file, to replace the {execution_platforms,toolchains}_to_register attributes on the module() directive.
PiperOrigin-RevId: 459714400
Change-Id: If8a25ef92ac695a3f012d54d0e189d8ae25d0833
fmeum pushed a commit to fmeum/bazel that referenced this issue Jul 11, 2022
…zel files

These are intended to replace the {execution_platforms,toolchains}_to_register attribtues on the module() directive, which are a bit harder to use since they have to be grouped up together near the top.

bazelbuild#15829

RELNOTES: Added new register_{execution_platforms,toolchains} directives to the MODULE.bazel file, to replace the {execution_platforms,toolchains}_to_register attributes on the module() directive.
PiperOrigin-RevId: 459714400
Change-Id: If8a25ef92ac695a3f012d54d0e189d8ae25d0833
@fmeum
Copy link
Collaborator

fmeum commented Jul 11, 2022

@bazel-io flag

@bazel-io bazel-io added the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label Jul 11, 2022
@ckolli5
Copy link

ckolli5 commented Jul 11, 2022

@bazel-io fork 5.3.0

@bazel-io bazel-io removed the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label Jul 11, 2022
fmeum pushed a commit to fmeum/bazel that referenced this issue Jul 12, 2022
…zel files

These are intended to replace the {execution_platforms,toolchains}_to_register attribtues on the module() directive, which are a bit harder to use since they have to be grouped up together near the top.

bazelbuild#15829

RELNOTES: Added new register_{execution_platforms,toolchains} directives to the MODULE.bazel file, to replace the {execution_platforms,toolchains}_to_register attributes on the module() directive.
PiperOrigin-RevId: 459714400
Change-Id: If8a25ef92ac695a3f012d54d0e189d8ae25d0833
ckolli5 added a commit that referenced this issue Jul 18, 2022
…zel files (#15852)

These are intended to replace the {execution_platforms,toolchains}_to_register attribtues on the module() directive, which are a bit harder to use since they have to be grouped up together near the top.

#15829

RELNOTES: Added new register_{execution_platforms,toolchains} directives to the MODULE.bazel file, to replace the {execution_platforms,toolchains}_to_register attributes on the module() directive.
PiperOrigin-RevId: 459714400
Change-Id: If8a25ef92ac695a3f012d54d0e189d8ae25d0833

Co-authored-by: Googler <[email protected]>
Co-authored-by: Chenchu K <[email protected]>
aranguyen pushed a commit to aranguyen/bazel that referenced this issue Jul 20, 2022
…zel files

These are intended to replace the {execution_platforms,toolchains}_to_register attribtues on the module() directive, which are a bit harder to use since they have to be grouped up together near the top.

bazelbuild#15829

RELNOTES: Added new register_{execution_platforms,toolchains} directives to the MODULE.bazel file, to replace the {execution_platforms,toolchains}_to_register attributes on the module() directive.
PiperOrigin-RevId: 459714400
Change-Id: If8a25ef92ac695a3f012d54d0e189d8ae25d0833
aranguyen pushed a commit to aranguyen/bazel that referenced this issue Jul 20, 2022
bazelbuild#15829

PiperOrigin-RevId: 459714912
Change-Id: I70d4dfbdaab85364bf4db526e07aa80ae7eba552
aranguyen pushed a commit to aranguyen/bazel that referenced this issue Jul 20, 2022
…zel files

These are intended to replace the {execution_platforms,toolchains}_to_register attribtues on the module() directive, which are a bit harder to use since they have to be grouped up together near the top.

bazelbuild#15829

RELNOTES: Added new register_{execution_platforms,toolchains} directives to the MODULE.bazel file, to replace the {execution_platforms,toolchains}_to_register attributes on the module() directive.
PiperOrigin-RevId: 459714400
Change-Id: If8a25ef92ac695a3f012d54d0e189d8ae25d0833
aranguyen pushed a commit to aranguyen/bazel that referenced this issue Jul 20, 2022
bazelbuild#15829

PiperOrigin-RevId: 459714912
Change-Id: I70d4dfbdaab85364bf4db526e07aa80ae7eba552
@Wyverald Wyverald added this to the 6.0.0 release blockers milestone Aug 24, 2022
aiuto pushed a commit to aiuto/bazel that referenced this issue Oct 12, 2022
Fixes bazelbuild#15829

PiperOrigin-RevId: 473753020
Change-Id: I73b442693fc7452aa8364e594e5cc78b7dae1954
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Bzlmod Bzlmod-specific PRs, issues, and feature requests P2 We'll consider working on this in future. (Assignee optional) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: feature request
Projects
None yet
Development

No branches or pull requests

4 participants