-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-CLIArea: Command-line interface (CLI) to the compilerArea: Command-line interface (CLI) to the compilerA-doctestsArea: Documentation tests, run by rustdocArea: Documentation tests, run by rustdocC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: 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.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Description
A command line option to pass program arguments to the underlying compiler building doctests.
Original issue motivating this feature: #67533.
Steps
- Implementation PR
- Stabilization PR (see instructions on rustc-dev-guide)
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 torustc
not to split inside the argsfile)?
Implementation History
Metadata
Metadata
Assignees
Labels
A-CLIArea: Command-line interface (CLI) to the compilerArea: Command-line interface (CLI) to the compilerA-doctestsArea: Documentation tests, run by rustdocArea: Documentation tests, run by rustdocC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: 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.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Projects
Status
No status