bazelbuild / bazelbuild/bazel

The `label_flag`, `label_setting` rules have no reference documentation

Open
#16,128 3 comments 0 reactions 0 assignees View on GitHub
good first issue help wanted P3 team-Configurability team-Documentation type: documentation (cleanup)
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 16h
Merged PRs (30d)
72

Description

### Description of the bug:

The `label_flag` and `label_setting` built-in rules are discussed in https://bazel.build/extending/config#label-typed-build-settings, but have no reference documentation listing their attributes. It should probably be documented at https://bazel.build/reference/be/general. Only by searching around the internet for code examples did I find, for example, that the `label_flag` rule has a `help` attribute!

The situation is even more dire with `label_setting`, because there is no example code showing how one might use it.

### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

_No response_

### 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 master; git rev-parse HEAD` ?

_No response_

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

_No response_

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

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the existing label-typed build settings documentation at bazel.build/extending/config#label-typed-build-settings, then compare the reference structure at bazel.build/reference/be/general. Document the attributes of label_flag and label_setting and add a label_setting usage example; done means both rules have discoverable reference entries covering their attributes.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.