bazelbuild/bazel

Offer a way to get a provider from ctx.super() response

Open

#26,960 建立於 2025年9月11日

在 GitHub 查看
 (3 留言) (3 反應) (0 負責人)Java (4,465 fork)batch import
P3help wantedteam-Rules-APItype: feature request

倉庫指標

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

描述

Description of the feature request:

The response from ctx.super() contains the providers returned by the parent rule, and it is possible to get these by indexing the returned value. However, there is no easy way to get a particular provider from the response. Native providers can be found by looking at the type of each provider, but custom providers simply show up as a struct.

Which category does this issue belong to?

Rules API

What underlying problem are you trying to solve with this feature?

I need to get a field from one of the providers returned by the parent rule.

Which operating system are you running Bazel on?

No response

What is the output of bazel info release?

8.4.0

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 HEAD ?

Have you found anything relevant by searching the web?

No response

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

No response

貢獻者指南