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

can't install rustc-docs component: detected conflict: 'share/doc/rust/html/rustc' #75833

Open
matthiaskrgr opened this issue Aug 23, 2020 · 34 comments
Labels
C-bug Category: This is a bug. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

info: downloading component 'rustc-docs'
info: installing component 'rustc-docs'
info: Defaulting to 500.0 MiB unpack ram
  9.9 MiB /   9.9 MiB (100 %)   2.9 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"'

#75593 was supposed to fix this but it didn't work out I guess?

@Mark-Simulacrum
Copy link
Member

Ah, right. https://doc.rust-lang.org/nightly/rustc/ (and the docs/html/rustc) directory do overlap. I guess we can call the directory rustc-docs or something? Seems rather annoying. I guess we could also put it at share/doc/rustc/html but that seems also not great.

@Mark-Simulacrum Mark-Simulacrum added the T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. label Aug 23, 2020
@esavier
Copy link

esavier commented Sep 15, 2020

hey, i am wondering are there any way to at least bypass this issue temporarily ?

@Mark-Simulacrum
Copy link
Member

The rustc docs are available online https://doc.rust-lang.org/nightly/nightly-rustc/, and you can install the component locally with rustup-toolchain-install-master from crates.io, which doesn't complain as much about conflicts.

@x10an14
Copy link

x10an14 commented Sep 16, 2020

I've got this issue too! So if anyone's got any hints/tips, it'd be much appreciated!!

[2020-09-16 19:50:50] 0 x10an14@x10-desktop:~/nav_github/rust-poc                                               (main=)
-> $ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/x10an14/.rustup

stable-x86_64-unknown-linux-gnu (default)
rustc 1.46.0 (04488afe3 2020-08-24)
[2020-09-16 19:52:21] 0 x10an14@x10-desktop:~/nav_github/rust-poc                                                                                                                                                                                             (main=)
-> $ la .git
total 52K
4.0K drwxr-xr-x 8 x10an14 x10an14 4.0K Sep 16 19:41 ./
4.0K drwxr-xr-x 5 x10an14 x10an14 4.0K Sep 16 19:44 ../
4.0K drwxr-xr-x 2 x10an14 x10an14 4.0K Sep 16 19:41 branches/
4.0K -rw-r--r-- 1 x10an14 x10an14  255 Sep 16 19:41 config
4.0K -rw-r--r-- 1 x10an14 x10an14   73 Sep 16 19:41 description
4.0K -rw-r--r-- 1 x10an14 x10an14   21 Sep 16 19:41 HEAD
4.0K drwxr-xr-x 2 x10an14 x10an14 4.0K Sep 16 19:41 hooks/
4.0K -rw-r--r-- 1 x10an14 x10an14  889 Sep 16 19:41 index
4.0K drwxr-xr-x 2 x10an14 x10an14 4.0K Sep 16 19:41 info/
4.0K drwxr-xr-x 3 x10an14 x10an14 4.0K Sep 16 19:41 logs/
4.0K drwxr-xr-x 4 x10an14 x10an14 4.0K Sep 16 19:41 objects/
4.0K -rw-r--r-- 1 x10an14 x10an14  112 Sep 16 19:41 packed-refs
4.0K drwxr-xr-x 5 x10an14 x10an14 4.0K Sep 16 19:41 refs/
[2020-09-16 19:52:27] 0 x10an14@x10-desktop:~/nav_github/rust-poc                                                                                                                                                                                             (main=)
-> $ rustup override set nightly
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2020-09-16, rust version 1.48.0-nightly (6af1bdda5 2020-09-15)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'llvm-tools-preview'
info: downloading component 'miri'
info: downloading component 'rls'
info: downloading component 'rust-analysis'
info: downloading component 'rust-analyzer-preview'
info: downloading component 'rust-docs'
info: downloading component 'rust-src'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustc-dev'
info: downloading component 'rustc-docs'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: Defaulting to 500.0 MiB unpack ram
info: installing component 'clippy'
info: installing component 'llvm-tools-preview'
 20.0 MiB /  20.0 MiB (100 %)  14.7 MiB/s in  1s ETA:  0s
info: installing component 'miri'
info: installing component 'rls'
info: installing component 'rust-analysis'
info: installing component 'rust-analyzer-preview'
info: installing component 'rust-docs'
 13.1 MiB /  13.1 MiB (100 %)  13.1 MiB/s in  1s ETA:  0s
info: installing component 'rust-src'
info: installing component 'rust-std'
 21.2 MiB /  21.2 MiB (100 %)  12.6 MiB/s in  1s ETA:  0s
info: installing component 'rustc'
 55.2 MiB /  55.2 MiB (100 %)  14.1 MiB/s in  3s ETA:  0s
info: installing component 'rustc-dev'
 89.5 MiB /  89.5 MiB (100 %)  13.6 MiB/s in  6s ETA:  0s
info: installing component 'rustc-docs'
info: rolling back changes
error: failed to install component: 'rustc-docs-x86_64-unknown-linux-gnu', detected conflict: '"share/doc/rust/html/rustc"'
[2020-09-16 19:52:52] 1 x10an14@x10-desktop:~/nav_github/rust-poc                                                                                                                                                                                             (main=)
-> $ 

@Mark-Simulacrum
Copy link
Member

Are you seeing that by default? @kinnison -- do we need to disable rustc-docs as a component or move it out of the complete profile perhaps?

@Mark-Simulacrum Mark-Simulacrum added the T-release Relevant to the release subteam, which will review and decide on the PR/issue. label Sep 16, 2020
@x10an14
Copy link

x10an14 commented Sep 16, 2020

Are you seeing that by default?

@Mark-Simulacrum Could you elaborate what you mean by this? =)

I meant to show with my copy/pasted terminal that I've got (globally) stable default, and when trying to set it to nightly in that specific folder (~/nav_github/rust-poc), I get the error/error-message as shown.

@kinnison
Copy link
Contributor

The complete profile is likely very rarely installable anyway, it's not great right now.

As for the conflicts you're seeing, We need to decide if a directory conflict is acceptable, file conflicts are not.

@Mark-Simulacrum
Copy link
Member

To be clear, right now the files are also likely to conflict, so rustc-docs just isn't installable alongside rust-docs.

I had thought the amount of people this bug affected is "about zero" though, but I guess if users are hitting it just on rustup default nightly or similar, then that's a problem...

@kinnison
Copy link
Contributor

If they've set their default profile to complete then they're going explicitly against our recommendations and chose to use a known-difficult/broken profile. It's not ideal but it shouldn't affect anyone who uses stable or sticks to minimal/default as a profile.

@x10an14
Copy link

x10an14 commented Sep 16, 2020

If they've set their default profile to complete then they're going explicitly against our recommendations and chose to use a known-difficult/broken profile.

Fair enough, but I cannot remember having done that. Not saying that I haven't, I honestly cannot remember. How can one tell?

@kinnison
Copy link
Contributor

How can one tell?

Apologies for the delay (timezone fun) -- You can run rustup show profile and if it's set to complete rather than one of minimal or default you can run rustup set profile default or similar.

@x10an14
Copy link

x10an14 commented Sep 17, 2020

(...) you can run rustup set profile default(...)

Can confirm. Works for me now! Thanks @kinnison! =)

[2020-09-17 13:39:53] 0 x10an14@x10-desktop:~/nav_github/rust-poc
-> $ rustup show profile
complete
[2020-09-17 13:40:24] 0 x10an14@x10-desktop:~/nav_github/rust-poc
-> $ rustup set profile default
info: profile set to 'default'
[2020-09-17 13:40:34] 0 x10an14@x10-desktop:~/nav_github/rust-poc
-> $ rustup override set nightly
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2020-09-17, rust version 1.48.0-nightly (285fc7d70 2020-09-16)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
 55.2 MiB /  55.2 MiB (100 %)  27.1 MiB/s in  2s ETA:  0s
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: Defaulting to 500.0 MiB unpack ram
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-std'
 21.2 MiB /  21.2 MiB (100 %)  12.7 MiB/s in  1s ETA:  0s
info: installing component 'rustc'
 55.2 MiB /  55.2 MiB (100 %)  14.1 MiB/s in  3s ETA:  0s
info: installing component 'rustfmt'
info: override toolchain for '/home/x10an14/Documents/nav/github/rust-poc' set to 'nightly-x86_64-unknown-linux-gnu'

  nightly-x86_64-unknown-linux-gnu installed - rustc 1.48.0-nightly (285fc7d70 2020-09-16)

[2020-09-17 13:42:30] 0 x10an14@x10-desktop:~/nav_github/rust-poc                                                                                                                                                                                             (main=)
-> $ cargo build
   Compiling typenum v1.12.0
(...)
   Compiling rocket_http v0.4.5
   Compiling rust-poc v0.1.0 (/home/x10an14/Documents/nav/github/rust-poc)
    Finished dev [unoptimized + debuginfo] target(s) in 19.96s
[2020-09-17 13:45:00] 0 x10an14@x10-desktop:~/nav_github/rust-poc                                                                                                                                                                                             (main=)
->

@spdionis
Copy link

spdionis commented Nov 3, 2020

If they've set their default profile to complete then they're going explicitly against our recommendations and chose to use a known-difficult/broken profile. It's not ideal but it shouldn't affect anyone who uses stable or sticks to minimal/default as a profile.

This recommendation is not mentioned in the rustup install tool. If one just uses the recommended command for WSL in https://www.rust-lang.org/tools/install and chooses the complete option the install won't work.

@kinnison
Copy link
Contributor

@spdionis https://rust-lang.github.io/rustup/concepts/profiles.html states quite clearly that complete should not be used. Perhaps we should alter the tool to not mention it at all though.

@ahcm
Copy link

ahcm commented Dec 20, 2020

If it is broken, it should not be a choice. A sane additional profile choice including rls and other often used components should be added instead.

@Lucretiel
Copy link
Contributor

Agreed. This is the first I'm learning of the fact that we recommend not using complete at all. My understanding from a few years ago was "use complete if you work on rustc or the standard library", which I do, and nothing had ever prompted me to change that understanding.

@VGkav
Copy link

VGkav commented Jan 5, 2021

This type of error is peak linuxery.

@mscofield0
Copy link

Still an issue, I can't install a nightly toolchain

@esavier
Copy link

esavier commented Feb 3, 2021

If it is broken, it should not be a choice. A sane additional profile choice including rls and other often used components should be added instead.

it was installable before, what's the point in keeping broken profile?
i see two options ahead, either changing complete so it has only components that works, or fixing what's broken.
Also mind that the profile is not failing on any component, (i.e. this is not a build issue). Everything is buildable and runnable. The Problem is with doc paths apparently :/

@kinnison
Copy link
Contributor

kinnison commented Feb 7, 2021

Personally I think that complete shouldn't be present in stable releases, and then it would come with all the usual nightly has no guarantees statement.

Deciding on the right approach for how to deal with overlapping files in components vs. forcing the components to not overlap is what will help with rustc-docs directly though.

@Mark-Simulacrum
Copy link
Member

For now it probably makes sense to drop rustc-docs from complete, I guess - not sure I'm exactly a fan of that but it seems like the right thing to do.

@esavier
Copy link

esavier commented Feb 7, 2021

Dropping this is at least something that would make complete viable again. It may be reintroduced later when the issue of paths overlapping is resolved, whatever the resolution may be.

Whenever complete should be present or not is for a debate. I think it should stay, since it's not necessary to use it, and it should not be the default, but this is only my opinion.

@Artemis21
Copy link

I think the warning that complete is not recommended should be stronger, I only got it after I had selected it. Intuitively, it seems like complete would be the ideal profile if storage space was not a concern.

@TomzBench
Copy link

TomzBench commented Mar 15, 2021

I read most of the docs and was super fired up to install some rust and start coding. Therefore i selected "complete" for a profile. Because i thought, "I love rust! ...gimme the whole thing!"
...
(Ya - the tool should not have this option)

@George3d6
Copy link

George3d6 commented Jun 19, 2021

This seems to now happen with rustup default nightly :(

Works with:

rustup toolchain install nightly --profile=minimal
rustup default nightly

But it's fairly confusing that this is the only way to get nightly working and I'm also surprised it doesn't happen for stable.

Probably not ideal since figuring out the only way to get this to work is via minimal is a bit annoying, and many "beginner" libraries require rocket, so I assume loads of new people might hit this wall... maybe I'm pessimistic.

@NightMachinery
Copy link

This happens when installing rust for the first time, if you use use nightly complete in the installation options.

@AZMCode
Copy link

AZMCode commented Sep 19, 2021

Perhaps there should be an override similar to RUSTUP_HOME or CARGO_HOME for doc, or just install the docs into one of those directories.
I'm currently unable to have a separate rust install because of this issue. I suggest RUST_DOCS or RUST_DOCS_HOME.
Either that or simply allow the installation of specific components in rustup.

@randall-coding
Copy link

randall-coding commented Jan 18, 2022

This happens when installing rust for the first time, if you use use nightly complete in the installation options.

I came here with the same problem didn't know it was from using nightly + complete.

I know at one point I did run that. But right now I'm getting errors just running rustup toolchain install nightly after uninstalling nightly.

@BartMassey
Copy link
Contributor

@randall-coding Run rustup set profile default and you should be good, I think?

@BartMassey
Copy link
Contributor

Can we please remove rustc-docs from complete and remove this user trap for now? I'm all for a better solution, but having just run into this problem myself I'd really like to avoid others doing so until it gets figured out. I was working on rustc, which is why I had complete set on an old machine. More recently I tried to use that machine to run some benchmarks against nightly…

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 11, 2022
…plete, r=pietroalbini

Drop rustc-docs from complete profile

Addresses rust-lang#75833, but does not fully fix it -- we should support side-by-side installation of these ideally, but that's not currently possible.

r? `@pietroalbini`
@ThePuzzlemaker
Copy link
Contributor

I'd like to see this solved if possible--as a rustc contributor, I often find myself trawling through rustc's internal docs, and I've found that having a local copy is much faster to load than a remote copy--just due to the sheer amount of content present. While it is possible to just have rustup try and download the component (and fail, but keep it in ~/.rustc/downloads), then tar -xf and copy the docs to some other place, it would be helpful to have them updated automatically when updating rustc.

One possible solution is just to mirror the online link and have it install to share/doc/rust/html/nightly-rustc.

@matthiaskrgr
Copy link
Member Author

Can confirm that this is still a problem as I just ran into it again and found my own issue from 3 years ago 😆

@matthiaskrgr matthiaskrgr changed the title can't install rustc-docs component can't install rustc-docs component: detected conflict: 'share/doc/rust/html/rustc' Mar 16, 2024
@rami3l
Copy link
Member

rami3l commented Mar 17, 2024

Coming from rust-lang/rustup#3717, I'd like to know if we can assign another folder name to rustc-docs?

It would be a hack to manually change the name from Rustup's side, so I'm reluctant to do so.

Currently share/doc/rust/html/rustc stands for the Rustc Book. So when we install rustc-docs Rustup will complain that there is already another component taking its place. (And no, these folders are not mergable, I just checked again. They just happen to have the same name.)
https://rust-lang.zulipchat.com/#narrow/stream/241545-t-release/topic/Ship.20Rustc.20internal.20API.20docs.20with.20Rustup.3F/near/426884248

I'd say the naming of share/doc/rust/html/rustc is very confusing, but maybe it's too late to change.

OTOH @ThePuzzlemaker's share/doc/rust/html/nightly-rustc does look a bit weird to me (nightly-rustc has nothing to do with the current rustc, i.e. the Rustc Book, but they somehow appear similar just looking at the names).

I personally would like to see something like share/doc/rust/html/rustc-docs or share/doc/rust/html/rustc-api for this component.

cc @pietroalbini

@Mark-Simulacrum
Copy link
Member

I don't see any reason we can't change the file path, but we will need to update https://github.com/rust-lang/promote-release/blob/4f839d6a209966ead020f6a8613c70e5e6e3a630/src/main.rs#L488 to make sure the doc.rust-lang.org docs still work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests