bazelbuild/bazel

Documentation issue: attr

Open

#13 782 ouverte le 31 juil. 2021

Voir sur GitHub
 (1 commentaire) (0 réactions) (0 assignés)Java (4 465 forks)batch import
P3help wantedteam-Configurabilityteam-Documentationtype: documentation (cleanup)

Métriques du dépôt

Stars
 (25 384 stars)
Métriques de merge PR
 (Merge moyen 22j 20h) (77 PRs mergées en 30 j)

Description

Documentation URL: https://docs.bazel.build/versions/main/skylark/lib/attr.html

The documentation for the cfg parameter is incomplete and misleading to those who have not grok-ed all of Bazel's concepts yet.

It currently states:

cfg default = None Configuration of the attribute. It can be either "host", "exec", or "target". This parameter is required if executable is True to guard against accidentally building host tools in the target configuration. "target" has no semantic effect, so don't set it when executable is False unless it really helps clarify your intentions.

If one does not navigate to the configuration link and read all of that documentation, it is unclear that you can provide your own transition. This can be problematic when first learning bazel and assuming the value can actually only be unspecified, "host", "exec", or "target".

Guide contributeur