Skip to content

Add subrule_ctx.info_file #25695

@jacky8hyf

Description

@jacky8hyf

Description of the feature request:

Add subrule_ctx.info_file so that we can access the content of ctx.info_file within a subrule.

Which category does this issue belong to?

Rules API

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

I am trying to access ctx.info_file within a subrule.

Which operating system are you running Bazel on?

Linux

What is the output of bazel info release?

release 8.0.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?

https://docs.google.com/document/d/1RbNC88QieKvBEwir7iV5zZU08AaMlOzxhVkPnmKDedQ

suggests that:

info_file, version_file: Special inputs to the rules. Most likely the rule should keep control over them. Prefer to keep them on the rule-level only and pass them to subrules.

Can we add info_file to subrule_ctx?

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

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4This is either out of scope or we don't have bandwidth to review a PR. (No assignee)team-Rules-APIAPI for writing rules/aspects: providers, runfiles, actions, artifactstype: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions