Skip to content

sphinx_docs doesn't propagate tags to .run target #2441

@tpudlik

Description

@tpudlik

🐞 bug report

Affected Rule

The issue is caused by the rule: sphinx_docs

Is this a regression?

I don't believe so.

Description

The sphinx_docs macro generates (among others) the <name>.run target, but doesn't pass the tags to it. This means that if you try to use tags = ["manual"], or more generally --build_tag_filters, to not build the docs as part of the wildcard build in some circumstances, you will generally fail: the docs will still be built because they're a dependency of the .run target.

I think at least the tags should be forwarded to sphinx_run, but perhaps all common_kwargs should be?

🔬 Minimal Reproduction

🌍 Your Environment

Operating System:

  
Linux
  

Output of bazel version:

  
1ff5af18d045e8f30a2a0367470db4e8225a785c
  

Rules_python version:

  
0.36.0
  

But this issue is present at HEAD, too.

Anything else relevant?

I'm happy to send a PR fixing this, but wanted to double-check if forwarding all common_kwargs is correct, or if I should be more surgical here. @rickeylev what's your recommendation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions