Skip to content

Commit

Permalink
Update existing_rule/s doc (and fix unterminated html tag)
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 683789998
Change-Id: I27e2b035be4e797467ab036eb1d4b41ba0947a07
  • Loading branch information
tetromino authored and copybara-github committed Oct 8, 2024
1 parent e3cd986 commit 3b70b64
Showing 1 changed file with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,14 @@ Sequence<?> glob(
+ " whose default value is computed are excluded from the result. (Computed defaults"
+ " cannot be computed until the analysis phase.).</li>" //
+ "</ul>" //
+ "<p>If possible, avoid using this function. It makes BUILD files brittle and"
+ " order-dependent. Also, beware that it differs subtly from the two"
+ " other conversions of rule attribute values from internal form to Starlark: one"
+ " used by computed defaults, the other used by <code>ctx.attr.foo</code>.",
+ "<p>If possible, use this function only in <a"
+ " href=\"https://bazel.build/extending/macros#finalizers\">implementation functions"
+ " of rule finalizer symbolic macros</a>. Use of this function in other contexts is"
+ " not recommened, and will be disabled in a future Bazel release; it makes"
+ " <code>BUILD</code> files brittle and order-dependent. Also, beware that it"
+ " differs subtly from the two other conversions of rule attribute values from"
+ " internal form to Starlark: one used by computed defaults, the other used by"
+ " <code>ctx.attr.foo</code>.",
parameters = {@Param(name = "name", doc = "The name of the target.")},
useStarlarkThread = true)
Object existingRule(String name, StarlarkThread thread) throws EvalException;
Expand All @@ -143,8 +147,11 @@ Sequence<?> glob(
+ " <code>x</code> supporting dict-like iteration, <code>len(x)</code>, <code>name in"
+ " x</code>, <code>x[name]</code>, <code>x.get(name)</code>, <code>x.items()</code>,"
+ " <code>x.keys()</code>, and <code>x.values()</code>." //
+ "<p><em>Note: If possible, avoid using this function. It makes BUILD files brittle"
+ " and order-dependent.",
+ "<p>If possible, use this function only in <a"
+ " href=\"https://bazel.build/extending/macros#finalizers\">implementation functions"
+ " of rule finalizer symbolic macros</a>. Use of this function in other contexts is"
+ " not recommened, and will be disabled in a future Bazel release; it makes"
+ " <code>BUILD</code> files brittle and order-dependent.",
useStarlarkThread = true)
Object existingRules(StarlarkThread thread) throws EvalException;

Expand Down

0 comments on commit 3b70b64

Please sign in to comment.