bazelbuild/bazel

Clarify where repository rules should be defined

Open

#8,941 创建于 2019年7月20日

在 GitHub 查看
 (0 评论) (1 反应) (0 负责人)Java (4,465 fork)batch import
P3help wantedteam-Documentationteam-ExternalDepstype: documentation (cleanup)

仓库指标

Star
 (25,384 star)
PR 合并指标
 (平均合并 22天 20小时) (30 天内合并 77 个 PR)

描述

Description of the feature request:

Add wording in the Bazel rule deployment guidelines clarifying where repository rules should be defined: defs.bzl, repositories.bzl or elsewhere?

Feature requests: what underlying problem are you trying to solve with this feature?

Currently, the documentation says "rules" should be exposed in defs.bzl. There is a section titled "Repository rules", which one would expect says what to do about repository rules, but it only discusses introducing a single macro that defines all necessary dependencies. If I have a set of rules called rules_foo, which perhaps has a few build rules and several repository rules, it's unclear where the user should expect to find all the repository rules.

贡献者指南