Offer a way to get a provider from ctx.super() response
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### 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` ?
```text
```
### Have you found anything relevant by searching the web?
_No response_
### Any other information, logs, or outputs that you want to share?
_No response_
Contributor guide
Research direction
The issue names the Rules API and ctx.super(); begin by locating the implementation and tests for ctx.super() and provider access. Compare how native and custom providers are represented, then define and test how a specific provider can be selected and its field retrieved.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100