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

feat(cli/rustup-mode): allow rustup doc with both a flag and a topic #4070

Merged
merged 11 commits into from
Dec 10, 2024

Conversation

rami3l
Copy link
Member

@rami3l rami3l commented Nov 9, 2024

This PR is my stab at the concern in #4069.

However, I think rustup should not magically detect and acknowledge lints, so I've made a more neutral solution that might apply to more topics:

Does rustup doc --rustdoc lints::broken_intra_doc_links look okay to you?

I mean, we can try with the following semantics with lints::broken_intra_doc_links:

  1. Look for lints/broken_intra_doc_links/index.html.
  2. Look for lints/broken_intra_doc_links.html.
  3. Look for lints.html. If it exists, resolve to lints.html#broken_intra_doc_links.
  4. Throw an error.

PS: I have manually verified that this algorithm, if implemented correctly, will work with rustc, rustdoc and clippy books.
#4069 (comment)

Concerns

  • Should we add test cases for this PR, and how may we add them? Added --path tests to ensure that we can get the doc paths right.

@rami3l rami3l marked this pull request as draft November 9, 2024 15:58
@rami3l rami3l force-pushed the feat/doc-topic-and-flag branch from 8e99ab6 to a1f70d7 Compare November 9, 2024 16:03
@rami3l rami3l force-pushed the feat/doc-topic-and-flag branch from a1f70d7 to 43757fb Compare November 26, 2024 13:47
@rami3l rami3l requested a review from djc November 26, 2024 14:00
@rami3l rami3l marked this pull request as ready for review November 26, 2024 14:01
@rami3l rami3l requested a review from ChrisDenton November 26, 2024 14:02
@rami3l
Copy link
Member Author

rami3l commented Nov 26, 2024

PS: The CI failures seem irrelevant to the changes being made in this PR.

@rami3l
Copy link
Member Author

rami3l commented Dec 7, 2024

PS: The CI failures seem irrelevant to the changes being made in this PR.

This issue has been resolved in rust-lang/rust#133532.

Copy link
Contributor

@djc djc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! (I assume you'll rebase this to ditch the merge commit?)

src/cli/topical_doc.rs Outdated Show resolved Hide resolved
src/cli/topical_doc.rs Outdated Show resolved Hide resolved
src/cli/rustup_mode.rs Outdated Show resolved Hide resolved
src/toolchain.rs Outdated Show resolved Hide resolved
src/cli/rustup_mode.rs Outdated Show resolved Hide resolved
src/cli/rustup_mode.rs Outdated Show resolved Hide resolved
tests/suite/cli_rustup.rs Outdated Show resolved Hide resolved
@rami3l rami3l force-pushed the feat/doc-topic-and-flag branch 3 times, most recently from 4f46570 to 19a006b Compare December 9, 2024 13:31
@rami3l rami3l force-pushed the feat/doc-topic-and-flag branch from 19a006b to 90a6e35 Compare December 9, 2024 13:35
@rami3l rami3l force-pushed the feat/doc-topic-and-flag branch from 90a6e35 to 637ec57 Compare December 9, 2024 13:47
@rami3l rami3l requested a review from djc December 9, 2024 13:47
@rami3l
Copy link
Member Author

rami3l commented Dec 10, 2024

@djc Do you think we can merge this change now, so that it can join the others in the upcoming beta? 🙏

@djc
Copy link
Contributor

djc commented Dec 10, 2024

I already approved it, so feel free to merge unless there's something in particular you want me to look at.

@rami3l
Copy link
Member Author

rami3l commented Dec 10, 2024

I already approved it, so feel free to merge unless there's something in particular you want me to look at.

@djc Thanks! There's probably #4070 (comment) although I don't think it should be blocking it being merged. Let's do the merge first and see.

@rami3l rami3l added this pull request to the merge queue Dec 10, 2024
Merged via the queue into rust-lang:master with commit b2622d6 Dec 10, 2024
27 checks passed
@rami3l rami3l deleted the feat/doc-topic-and-flag branch December 10, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants