bazelbuild/bazel

Documentation: upgrade rule() code samples from deprecated outputs attribute

Open

#15,643 建立於 2022年6月8日

在 GitHub 查看
 (0 留言) (2 反應) (0 負責人)Java (4,465 fork)batch import
P3help wantedteam-Documentationteam-Rules-APItype: documentation (cleanup)

倉庫指標

Star
 (25,384 star)
PR 合併指標
 (平均合併 22天 20小時) (30 天內合併 77 個 PR)

描述

Description of the bug:

Code samples from https://bazel.build/rules/rules#using_the_validations_output_group include

rule_with_validation = rule(
  implementation = _rule_with_validation_impl,
  outputs = {
...

but according to https://bazel.build/rules/lib/globals#rule, output is deprecated and is disabled with -incompatible_no_rule_outputs_param.

Also for This parameter has been deprecated. Migrate rules to use OutputGroupInfo or attr.output instead., let's link to further details / examples.

Let's have doc examples use current best practices.

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?

https://github.com/bazelbuild/bazel/issues/7977

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

No response

貢獻者指南