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

rust-docs and rustc-docs components conflict at share/doc/rust/html/rustc #108535

Closed
kkysen opened this issue Feb 7, 2023 · 7 comments
Closed
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@kkysen
Copy link

kkysen commented Feb 7, 2023

Problem

The rust-docs and rustc-docs components cannot be installed at the same time, as they conflict at share/doc/rust/html/rustc and share/doc/rust/html. Only one of them can be installed at a single time, but I don't see a reason why they can't have different install locations and coexist.

If rust-docs is installed already, then rustup component add rustc-docs fails with detected conflict: 'share/doc/rust/html/rustc'.

If rustc-docs is installed already, then rustup component add rust-docs fails with detected conflict: 'share/doc/rust/html'.

Steps

rustup component add rust-docs rustc-docs

More interactively, this is what happens when they're added and removed in different orders:

~/work/rust via 🐏 1GiB/8GiB | 0B/2GiB took 15ms
•100% at 07:29:58 PM ❯ cargo new rustup-component-test
     Created binary (application) `rustup-component-test` package

~/work/rust via 🐏 1GiB/8GiB | 0B/2GiB took 513ms
•100% at 07:30:04 PM ❯ cd rustup-component-test/

rustup-component-test on  master is 📦 v0.1.0 via 🦀 v1.67.0 via 🐏 1GiB/8GiB | 0B/2GiB took 7ms
✦ •100% at 07:30:06 PM ❯ rustup component add rustc-docs
info: downloading component 'rustc-docs'
info: installing component 'rustc-docs'
 17.0 MiB /  17.0 MiB (100 %)   5.1 MiB/s in  3s ETA:  0s
info: rolling back changes
error: failed to install component: 'rustc-docs-x86_64-unknown-linux-gnu', detected conflict: 'share/doc/rust/html/rustc'

rustup-component-test on  master is 📦 v0.1.0 via 🦀 v1.67.0 via 🐏 1GiB/8GiB | 0B/2GiB took 4s945ms
•100% at 07:30:20 PM ❯ rustup component add rust-docs
info: component 'rust-docs' for target 'x86_64-unknown-linux-gnu' is up to date

rustup-component-test on  master is 📦 v0.1.0 via 🦀 v1.67.0 via 🐏 1GiB/8GiB | 0B/2GiB took 120ms
•100% at 07:30:25 PM ❯ rustup component remove rust-docs
info: removing component 'rust-docs'

rustup-component-test on  master is 📦 v0.1.0 via 🦀 v1.67.0 via 🐏 1GiB/8GiB | 0B/2GiB took 2s850ms
•100% at 07:30:37 PM ❯ rustup component add rustc-docs
info: downloading component 'rustc-docs'
info: installing component 'rustc-docs'
 17.0 MiB /  17.0 MiB (100 %)   5.1 MiB/s in  3s ETA:  0s

rustup-component-test on  master is 📦 v0.1.0 via 🦀 v1.67.0 via 🐏 1GiB/8GiB | 0B/2GiB took 3s842ms
•100% at 07:30:43 PM ❯ rustup component add rust-docs
info: downloading component 'rust-docs'
info: installing component 'rust-docs'
 19.3 MiB /  19.3 MiB (100 %)   3.6 MiB/s in  4s ETA:  0s
info: rolling back changes
error: failed to install component: 'rust-docs-x86_64-unknown-linux-gnu', detected conflict: 'share/doc/rust/html'

Possible Solution(s)

Install rust-docs and rustc-docs in different locations so there's no conflict.

Notes

No response

Rustup version

rustup 1.25.2 (17db695f1 2023-02-01)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.67.0 (fc594f156 2023-01-24)`

Installed toolchains

Default host: x86_64-unknown-linux-gnu
rustup home:  /home/kkysen/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu
nightly-2019-12-05-x86_64-unknown-linux-gnu
nightly-2022-08-08-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu
1.65.0-x86_64-unknown-linux-gnu

active toolchain
----------------

stable-x86_64-unknown-linux-gnu (default)
rustc 1.67.0 (fc594f156 2023-01-24)
@rbtcollins
Copy link
Contributor

This shows up in rustup, but the conflict is genuine and a result of choices made in the rust repository itself. Some discussion https://discord.com/channels/442252698964721669/463480252723888159/1078052665260515428 -

@jyn514
Copy link
Member

jyn514 commented Feb 22, 2023

As a workaround, you can see the rustc docs online: https://doc.rust-lang.org/nightly/nightly-rustc/

@jyn514
Copy link
Member

jyn514 commented Feb 22, 2023

Looking at #49193, I'm not sure why these components are separate? @davidtwco it looks like when you added this component originally in #49193, the rustc book wasn't included in rust-docs; but it is today. So I think we should be able to just remove this component altogether?

cc @Mark-Simulacrum

@jyn514
Copy link
Member

jyn514 commented Feb 22, 2023

oh no I'm wrong, it turns out that both those components package share/doc/rust/html/rustc but they have different contents. that's ... quite unfortunate.

I think we should name the folder for rustc-docs something different altogether; maybe share/doc/rust/html/rustc-internals is better? https://github.com/rust-lang/promote-release/blob/2487cddad75a04d67e08a0cb5138c49ca4f50d07/src/main.rs#L498-L509 is renaming it to nightly-rustc on doc.rust-lang.org already, so I don't think the name change should break anything as long as we change that code to account for both possible names.

@Mark-Simulacrum Mark-Simulacrum transferred this issue from rust-lang/rustup Feb 27, 2023
@jyn514 jyn514 added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. labels Feb 27, 2023
@jyn514
Copy link
Member

jyn514 commented Feb 27, 2023

Relevant code:

tarball.add_bulk_dir(&builder.compiler_doc_out(host), "share/doc/rust/html/rustc");

@dfireBird
Copy link
Contributor

Can I work on this issue? I'm assuming it won't be as simple as changing the path in relevant code right? If so what do I need to do to make it a proper fix?

@matthiaskrgr
Copy link
Member

duplicate of #75833

@matthiaskrgr matthiaskrgr closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants