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

Redirect nightly doc to doc.rust-lang.org/nightly/nightly-rustc/cargo #11555

Closed
weihanglo opened this issue Jan 9, 2023 · 9 comments · Fixed by #11568
Closed

Redirect nightly doc to doc.rust-lang.org/nightly/nightly-rustc/cargo #11555

weihanglo opened this issue Jan 9, 2023 · 9 comments · Fixed by #11568
Assignees
Labels
A-documenting-cargo-itself Area: Cargo's documentation C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` E-easy Experience: Easy

Comments

@weihanglo
Copy link
Member

weihanglo commented Jan 9, 2023

Problem

After rust-lang/rust#105036, docs of Cargo and its companion crates are live now at https://doc.rust-lang.org/nightly/nightly-rustc.

I wonder whether https://doc.crates.io/contrib/apidoc/cargo should be redirected to that "canonical" URL. It might be more discoverable as all rustc internal docs are already there, whereas the doc will only get updated when cargo gets synced into rust-lang/rust repo, which happens only once or twice a week.

Proposed Solution

Follow the steps:

  1. Replace all occurrences of doc.crates.io/contrib/apidoc/cargo with doc.rust-lang.org/nightly/nightly-rustc/cargo in this repo.
  2. Do a redirect in mdbook book.toml from /apidoc/cargo to https://doc.rust-lang.org/nightly/nightly-rustc/cargo.
  3. Remove CI changes in ba3d2e9 and 1c82d9c.

Notes

No response

@weihanglo weihanglo added A-documenting-cargo-itself Area: Cargo's documentation C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` labels Jan 9, 2023
@weihanglo
Copy link
Member Author

cc @epage, as you participated in the PR building API doc. I personally favor keeping only https://doc.rust-lang.org/nightly/nightly-rustc/cargo though is fine with having both.

@epage
Copy link
Contributor

epage commented Jan 10, 2023

I'm fine with that. I assume the main side effect is it isn't updated until rust-lang/rust updates their copy of cargo?

@weihanglo
Copy link
Member Author

Yep. That's the main one. I cannot think of others at this moment though.

@weihanglo weihanglo added E-easy Experience: Easy E-help-wanted labels Jan 11, 2023
@jofas
Copy link
Contributor

jofas commented Jan 11, 2023

Hi,
person who is looking to make his first-time contribution here. Do I understand the contribution guide correctly that as long as this issue is tagged E-easy, I can open a PR that will be merged? Double checking, because CONTRIBUTING.md has a prominent notice, that only issues with Feature accepted tag are considered for merging.

@weihanglo
Copy link
Member Author

Thank you for asking! The words might be a bit too strong but the team does have a limited capacity for both design and code review. The idea here is to encourage people to start a discussion from an issue before submitting a pull request.

In general, with E-easy Experience: Easy label an issue is good to give it a shot. https://github.com/rust-lang/cargo/labels/E-mentor is similar as well. I'll also take care of that if it's tagged by me.

If you are willing to help a certain issue, you could optionally post a comment @rustbot claim to assign yourself.

@jofas
Copy link
Contributor

jofas commented Jan 11, 2023

Great, thank you!

@jofas
Copy link
Contributor

jofas commented Jan 11, 2023

@rustbot claim

@jofas
Copy link
Contributor

jofas commented Jan 12, 2023

2. Do a redirect in mdbook book.toml from /apidoc/cargo to https://doc.rust-lang.org/nightly/nightly-rustc/cargo.

I'm not quite sure which book.toml to change here, src/doc/book.toml (the one linked in the description) or the src/doc/contrib/book.toml. I think that the file @weihanglo wanted to link should be src/doc/contrib/book.toml, it would fit the redirection source /apidoc/cargo instead of /contrib/apidoc/cargo. Also, the contribution guide and the api docs are built in a different CI workflow than the cargo book, so I'd keep everything concerning the contribution guide (including the deprecated apidoc subdirectory) in src/doc/contrib, right?

@weihanglo
Copy link
Member Author

Oops that's my fault. And yes, you're totally correct! I believe that should work.

bors added a commit that referenced this issue Jan 12, 2023
Fix for #11555

Fix for #11555. I more or less blindly followed the instructions given by `@weihanglo` in the description of the issue:

1. I replaced every link from `doc.crates.io/contrib/apidoc/cargo` with `doc.rust-lang.org/nightly/nightly-rustc/cargo`
2. Added redirection rule to `src/doc/contrib/book.toml` that should redirect the `/apidoc/cargo/` endpoint to `https://doc.rust-lang.org/nightly/nightly-rustc/cargo`
3. Reverted the changes made to the CI workflow in ba3d2e9 and 1c82d9c (building the api docs as part of the contribution guide)
bors pushed a commit to rust-lang-ci/rust that referenced this issue Jan 14, 2023
8 commits in d992ab4e9034930e7809749f04077045af8f4d79..1cd6d3803dfb0b342272862a8590f5dfc9f72573
2023-01-10 14:36:41 +0100 to 2023-01-12 18:40:36 +0000

- Fix for rust-lang/cargo#11555 (rust-lang/cargo#11568)
- chore: Fix typos (rust-lang/cargo#11561)
- fix(docs): fix typo learm => learn in cargo tree docs (rust-lang/cargo#11560)
- Add fix for CVE-2022-46176 (rust-lang/cargo#11556)
- Fix panic on target dependency errors. (rust-lang/cargo#11541)
- Fix some doc links (rust-lang/cargo#11538)
- Cargo by default saves credentials to `.cargo/credentials.toml` (rust-lang/cargo#11533)
- Fix a typo in the registries documentation. (rust-lang/cargo#11535)
bors added a commit to rust-lang-ci/rust that referenced this issue Jan 14, 2023
Update cargo

8 commits in d992ab4e9034930e7809749f04077045af8f4d79..1cd6d3803dfb0b342272862a8590f5dfc9f72573 2023-01-10 14:36:41 +0100 to 2023-01-12 18:40:36 +0000

- Fix for rust-lang/cargo#11555 (rust-lang/cargo#11568)
- chore: Fix typos (rust-lang/cargo#11561)
- fix(docs): fix typo learm => learn in cargo tree docs (rust-lang/cargo#11560)
- Add fix for CVE-2022-46176 (rust-lang/cargo#11556)
- Fix panic on target dependency errors. (rust-lang/cargo#11541)
- Fix some doc links (rust-lang/cargo#11538)
- Cargo by default saves credentials to `.cargo/credentials.toml` (rust-lang/cargo#11533)
- Fix a typo in the registries documentation. (rust-lang/cargo#11535)
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 C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` E-easy Experience: Easy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants