Skip to content

Tracking Issue for rustdoc --doctest-build-arg command line option #134172

Open
@GuillaumeGomez

Description

@GuillaumeGomez

A command line option to pass program arguments to the underlying compiler building doctests.

Original issue motivating this feature: #67533.

Steps

Unresolved Questions

  • Should argument parsing be closer to what already exists for RUSTFLAGS (whitespace splitting and nothing else) or should it be closer to how shell parses input (take into account escaped characters and quote characters)? Or should we offer two options, one that works like RUSTFLAGS for human users and one that works like CARGO_ENCODED_RUSTLFAGS for tool usage? Update: #137096 (comment) changed the requirements and #139863 the design!
  • From #139863: Even though we don't process the argument passed to --doctest-build-arg, we end up passing it via an argument file (rustc @argfile) which delimits arguments by line break (LF or CRLF, via) meaning ultimately the arguments still get split which is unfortunate. Is there are good way to resolve this (obvious but intrusive solution: smh signal to rustc not to split inside the argsfile)?

Implementation History

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-CLIArea: Command-line interface (CLI) to the compilerA-doctestsArea: Documentation tests, run by rustdocC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions