Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify in documentation that --all-targets does not run doctests #12423

Closed
wants to merge 1 commit into from

Conversation

obi1kenobi
Copy link
Member

Based on discussion in #6669 (comment)

@rustbot
Copy link
Collaborator

rustbot commented Jul 31, 2023

r? @epage

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-documenting-cargo-itself Area: Cargo's documentation S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 31, 2023
@obi1kenobi
Copy link
Member Author

ah I messed this up, sorry -- don't bother reviewing yet 😅

@obi1kenobi
Copy link
Member Author

I'm actually a bit stuck here. The --all-targets doc block is shared between a number of different pages, and as far as I understand the caveat about doctests only really applies to cargo test and not, for example, cargo bench.

As one possibility, I could move the --all-targets doc to a separate "include" markdown file options-all-targets.md, then write a custom --all-targets doc block for cargo test. This would accomplish the goal, but at the cost of future edits to options-all-targets.md not being reflected in the cargo test page's entry for that flag.

What do you think @epage? Perhaps there's a better way?

@epage
Copy link
Contributor

epage commented Jul 31, 2023

Bleh, includes are difficult

Options

  • Don't bother with this part of the change
  • Duplicate the whole options-targets directly in cargo test
  • Add a variable to customize the behavior of options-targets

Not thrilled with any of the options

@obi1kenobi
Copy link
Member Author

Agreed, don't love any of them.

If you have a preference, I'm happy to do that. If not, I'll default to closing this and leaving a note about it in #6669 so it doesn't slip through the cracks and is readily found once the testing sub-team is up and running.

@epage epage changed the title Clarify that --all-targets does not run doctests Clarify in documentation that --all-targets does not run doctests Jul 31, 2023
@epage
Copy link
Contributor

epage commented Jul 31, 2023

For me, the more important part is everything but what is in the shared documentation. Since you aren't feeling up for that, I lean towards closing.

@obi1kenobi obi1kenobi closed this Jul 31, 2023
@obi1kenobi obi1kenobi deleted the patch-3 branch July 31, 2023 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documenting-cargo-itself Area: Cargo's documentation S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants