bazelbuild / bazelbuild/bazel

need a supported way to obtain the registered toolchains and the registered execution platforms

Open
#23,104 2 comments 1 reaction 1 assignee Claimed by @gregestren View on GitHub
more data needed team-Configurability type: feature request untriaged
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 16h
Merged PRs (30d)
72

Description

### Description of the feature request:

The file produced by `bazel sync --experimental_repository_resolved_file=resolve.out` contains entries for `//external/register_toolchains` and `//external/register_execution_platforms` which provide insight into what toolchains and execution platforms are currently registered for use by Bazel.

In the case of registered toolchains, this information is superior to what can be obtained via `--toolchain_resolution_debug` because one can definitively identify, for instance, all registered toolchains with certain constraints, without having to know a priori what all the possible things are you'd need to build, and how to build them, in order to see the toolchains mentioned in the `--toolchain_resolution_debug` output.

Since `bazel sync` is not supported with bzlmod and is slated to be deprecated (per slack conversation with @Wyverald and @katre ) it would be helpful to have a supported way to obtain this information with or without bzlmod. Hence, this request.

One suggestion in this conversation was to have one or more special new operators in Bazel's query language that would yield the lists of interest above. Note that these lists may include both targets inside the main repo and targets outside the main repo.

### Which category does this issue belong to?

CLI

### What underlying problem are you trying to solve with this feature?

To gain insight into certain bits of vital information about Bazel's internal state in a supported way.

### Which operating system are you running Bazel on?

_No response_

### What is the output of `bazel info release`?

_No response_

### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.

_No response_

### What's the output of `git remote get-url origin; git rev-parse HEAD` ?

_No response_

### Have you found anything relevant by searching the web?

No.

### Any other information, logs, or outputs that you want to share?

_No response_

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.