Add global rustdoc flag support

Open
#4,450 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
40/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
build-system

Research direction

Start by finding how the existing extra_rustc_flag and clippy_flag settings are declared and threaded through the toolchain in rust/private/, since the new rustdoc_flag should mirror them. Then follow how rustdoc actions are constructed in rust/private/rustdoc.bzl (and the utils it calls) to see where flags are appended, and add the global flag at the same point. Done means one global setting reaches every rustdoc build, with tests alongside the existing flag tests.

Written by the indexing model from the issue text.

Description

needs-triage

Is your feature request related to a problem? Please describe.
I want to be able to set --deny=rustdoc::private_intra_doc_links across all my rustdoc builds in the same way as extra_rustc_flag and clippy_flag.

Describe the solution you'd like
rustdoc_flag option allowing for setting flags for all rustdoc builds

Describe alternatives you've considered
Doing rustdoc_flags for every separate build. It's annoying and hard to keep them all in sync

Dominant language
Starlark
Stars
857
Forks
701
Avg merge
4d 7h
Merged PRs (30d)
46

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bazelbuild/rules_rust

All issues in bazelbuild/rules_rust

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.