Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

toolchain 'nightly-x86_64-unknown-linux-gnu' does not contain component 'rls-preview' for target 'x86_64-unknown-linux-gnu' #535

Closed
wfchandler opened this issue Oct 28, 2017 · 40 comments

Comments

@wfchandler
Copy link

After updating to 1.23.0-nightly (d9f124965 2017-10-27) I am receiving the error below when attempting to install RLS on Linux (nightly-x86_64-unknown-linux-gnu) and Windows (nightly-x86_64-pc-windows-msvc).

$ rustup component add rls-preview --toolchain nightly

error: toolchain 'nightly-x86_64-unknown-linux-gnu' does not contain component 'rls-preview' for target 'x86_64-unknown-linux-gnu'

Running 'rls' triggers this error:

$ rls

error: toolchain 'nightly-x86_64-unknown-linux-gnu' does not have the binary `rls`

A similar problem was reported last month under Issue 502, when the component was renamed from 'rls' to 'rls-preview'.

For me neither running 'rustup self update' nor uninstalling & reinstalling rustup resolved the issue.

@akiselev
Copy link

Same problem on Windows 10 Pro:

# rustup update
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
info: checking for self-updates

   stable-x86_64-pc-windows-msvc unchanged - rustc 1.21.0 (3b72af97e 2017-10-09)
  nightly-x86_64-pc-windows-msvc unchanged - rustc 1.23.0-nightly (d9f124965 2017-10-27)

# rustup component add rls-preview --toolchain nightly
error: toolchain 'nightly-x86_64-pc-windows-msvc' does not contain component 'rls-preview' for target 'x86_64-pc-windows-msvc'

# rls
error: toolchain 'nightly-x86_64-pc-windows-msvc' does not have the binary `rls.exe`

@wraithan
Copy link

Looks like all 3 major platforms, here's MacOS:

$ rustup component add rls-preview --toolchain nightly
error: toolchain 'nightly-x86_64-apple-darwin' does not contain component 'rls-preview' for target 'x86_64-apple-darwin'

Also tried reinstalling rustup and all rust related things.

@wraithan
Copy link

Ah, looks like a failed build on Appvayor and that a commit was just added to hopefully fix that.

@nrc
Copy link
Member

nrc commented Oct 28, 2017

The RLS is currently missing from the nightly channel because of build or testing issues. I recommend using the beta channel for now.

@woodgear
Copy link

when can it fix?

@wraithan
Copy link

You can also go back to nightly-2017-10-24 and things work fine there.

@klingtnet
Copy link

klingtnet commented Oct 28, 2017

@wraithan Could you please explain how to downgrade nightly?
I was able to install the toolchain rustup toolchain install nightly-2017-10-24 and also set it as a default rustup default nightly-2017-10-24 but the problem still persits.

As a workaround for the Rust (rls) vscode plugin one can set the toolchain to stable or something else by adding this to the user settings: "rust-client.channel": "<channel-name, e.g. stable>".

@booyaa
Copy link
Contributor

booyaa commented Oct 28, 2017

@klingtnet Using rustup default nightly-2017-10-24 is how I would've downgraded, so you did the right thing.

Can you try 2017-10-22? i tried to downgrade to -24 on my test account, but this didn't work either.

My working RLS uses the following:

rustup 1.6.0 (a11c01e8c 2017-08-30)
cargo 0.23.0-nightly (e447ac7e9 2017-09-27)
rustc 1.22.0-nightly (8493813cd 2017-10-22)
Default host: x86_64-apple-darwin

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

stable-x86_64-apple-darwin
nightly-x86_64-apple-darwin

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

nightly-x86_64-apple-darwin (directory override for '/Users/booyaa/Dev/rust/demo_time')
rustc 1.22.0-nightly (8493813cd 2017-10-22)

I'm going to do my own testing tomorrow...

@yxw820603
Copy link

yxw820603 commented Oct 29, 2017

after downgrade,use this command:

rustup component add rls-preview --toolchain nightly-2017-10-24

@booyaa
Copy link
Contributor

booyaa commented Oct 29, 2017

I've create a workaround issue in the rls-vscode repo to help people override the default channel toolchains: rust-lang/vscode-rust#181

@DSpeckhals
Copy link
Contributor

The RLS and rustfmt should be back in nightly once rust-lang/rust#45597 is merged.

@jcbritobr
Copy link

Same for me in Ubuntu 16.0.4

the toolchains are updated
stable-x86_64-unknown-linux-gnu unchanged - rustc 1.21.0 (3b72af97e 2017-10-09)
nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.23.0-nightly (269cf5026 2017-10-28)

@wfchandler
Copy link
Author

Updated to nightly-x86_64-unknown-linux-gnu - rustc 1.23.0-nightly (90ef3372e 2017-10-29), RLS is now available and working normally for me. Closing the issue.

Thanks, @DSpeckhals!

@toothbrush7777777
Copy link

RLS is again not available in nightly-x86_64-pc-windows-gnu - rustc 1.23.0-nightly (d762b1d6c 2017-11-04).

@jedisct1
Copy link

jedisct1 commented Nov 5, 2017

Same here on x86_64-apple-darwin.

@jotaerreah
Copy link

Same here.
nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.23.0-nightly (d762b1d6c 2017-11-04)
rustsrv:~ # rustup component add rls-preview --toolchain nightly
error: toolchain 'nightly-x86_64-unknown-linux-gnu' does not contain component 'rls-preview' for target 'x86_64-unknown-linux-gnu'

@toothbrush7777777
Copy link

toothbrush7777777 commented Nov 6, 2017

@jedisct1 @jotaerreah
rust-lang/rustup#1277 proposes prompting users of rustup if the latest updates do not contain an installed component.

@sfengyuan
Copy link

Same here

λ rustup component add rls-preview --toolchain nightly
error: toolchain 'nightly-x86_64-pc-windows-msvc' does not contain component 'rls-preview' for target 'x86_64-pc-windows-msvc'

@ivstas
Copy link

ivstas commented Nov 11, 2017

Works on latest rust toolchain:
nightly-x86_64-pc-windows-msvc updated - rustc 1.23.0-nightly (a35a3abcd 2017-11-10)

@forbjok
Copy link

forbjok commented Dec 2, 2017

I'm having the same issue now. I'm unable to install the rls-preview component on both Linux (Antergos and Arch) and Windows. Even downgrading to an older verison, such as 2017-11-10 mentioned above does not fix it.

EDIT:
Nevermind, found out that I had to manually run "rustup default nightly-2017-12-01" to change the current active toolchain to the previous version. That's a workaround.
Still, "rls-preview" apprears to be missing for the current nightly.

@DSpeckhals
Copy link
Contributor

DSpeckhals commented Dec 2, 2017

@forbjok The 2017-12-01 nightly does not contain RLS or rustfmt. There is a fix in process that should resolve this for a future nightly. 2017-11-30 should have it, though.

@cyplo
Copy link

cyplo commented Dec 3, 2017

2017-11-30 does not work for me, but 2017-11-29 does

@jedisct1
Copy link

jedisct1 commented Dec 3, 2017

Could this ticket be kept open until the root cause is found/fixed?

@beardedeagle
Copy link

Same here:

~ > rustup update
info: syncing channel updates for 'stable-x86_64-apple-darwin'
info: syncing channel updates for 'nightly-x86_64-apple-darwin'
info: checking for self-updates

  stable-x86_64-apple-darwin unchanged - rustc 1.22.1 (05e2e1c41 2017-11-22)
  nightly-x86_64-apple-darwin unchanged - rustc 1.24.0-nightly (1956d5535 2017-12-03)

~ > rls
error: toolchain 'nightly-x86_64-apple-darwin' does not have the binary `rls`
~ > rustup component add rls-preview --toolchain nightly

error: toolchain 'nightly-x86_64-apple-darwin' does not contain component 'rls-preview' for target 'x86_64-apple-darwin'

@DirtGrubDylan
Copy link

Having the same issue. Had to roll back to 2017-11-29. Here's how I got it working:

rustup default nightly-2017-11-19
rustup component add rust-src --toolchain nightly-2017-11-29
rustup component add rust-analysis --toolchain nightly-2017-11-29
rustup component add rls-preview --toolchain nightly-2017-11-29

@mqudsi
Copy link

mqudsi commented Dec 4, 2017

Can you please re-open this ticket as it is clearly not fixed or closed?

@DSpeckhals
Copy link
Contributor

The reason that the RLS sometimes is not included with the nightly releases is because the RLS is distributed with and tightly linked to the compiler (rustc). The compiler has daily changes, some of which cause breaking changes in the RLS and Rust Format. Because compiler development should not be inhibited by its tools (rustfmt, rls, clippy), these tools can be marked as broken by compiler developers, which makes it not included with nightly releases. They are marked as broken: a) because tests are failing, or b) because the RLS wouldn't compile anyway.

The current reason is because there was a change with use statements, that caused rustfmt to break, which in turn caused the RLS to break. (rust-lang/rust#45846)

There are efforts to improve this process (rust-lang/rust#45861), but thankfully, broken tools are usually fixed quickly.

For now, as stated above, you can pin your nightly, or use the beta channel.

@lnicola
Copy link
Member

lnicola commented Dec 7, 2017

For anyone following this, rls is now back.

@nayato
Copy link

nayato commented Dec 15, 2017

missing on msvc target in rustc 1.24.0-nightly (0077d128d 2017-12-14)

@mrkaspa
Copy link

mrkaspa commented Dec 22, 2017

Not working yet

@ivstas
Copy link

ivstas commented Dec 26, 2017

@DSpeckhals could you please suggest how to check which is the latest nighlty release that includes rls-preview component.

@Frederick888
Copy link

@ivstas A sloppy script for this purpose:

#!/bin/bash

for i in `seq 0 99`; do
    echo " === === === "
    RUST_DATE=`date -u -d "-$i days" "+%Y-%m-%d"`
    echo "Checking $RUST_DATE..."
    TOML=`curl -sf https://static.rust-lang.org/dist/$RUST_DATE/channel-rust-nightly.toml`
    if [[ $? -gt 0 ]]; then
        echo "Rust $RUST_DATE does not exist"
    else
        if [[ -n `echo $TOML | grep rls` && -n `echo $TOML | grep fmt` ]]; then
            echo "Rust $RUST_DATE has both rls and rustfmt"
            echo "Run \"rustup default nightly-$RUST_DATE\" to install it"
            break
        fi
    fi
done

Output:

frederick@FredArch:~|⇒  ./find_rls_fmt.sh 
 === === === 
Checking 2017-12-27...
 === === === 
Checking 2017-12-26...
 === === === 
Checking 2017-12-25...
 === === === 
Checking 2017-12-24...
 === === === 
Checking 2017-12-23...
 === === === 
Checking 2017-12-22...
 === === === 
Checking 2017-12-21...
Rust 2017-12-21 has both rls and rustfmt
Run "rustup default nightly-2017-12-21" to install it

@koogle
Copy link

koogle commented Dec 27, 2017

@Frederick888 fixed it for mac, thanks for script

#!/bin/bash

for i in `seq 0 99`; do
    echo " === === === "
    if [[ $(uname) == "Darwin" ]]; then
	RUST_DATE=`date -v -${i}d "+%Y-%m-%d"`
    else
    	RUST_DATE=`date -u -d "-$i days" "+%Y-%m-%d"`
    fi
    echo "Checking $RUST_DATE..."
    TOML=`curl -sf https://static.rust-lang.org/dist/$RUST_DATE/channel-rust-nightly.toml`
    if [[ $? -gt 0 ]]; then
        echo "Rust $RUST_DATE does not exist"
    else
        if [[ -n `echo $TOML | grep rls` && -n `echo $TOML | grep fmt` ]]; then
            echo "Rust $RUST_DATE has both rls and rustfmt"
            echo "Run \"rustup default nightly-$RUST_DATE\" to install it"
            break
        fi
    fi
done

latest is as of today nightly-2017-12-21

@HerringtonDarkholme
Copy link

@Frederick888 Thanks! Would you like to add it in project's README? It would help more people in readme than in a closed issue.

@r-arias
Copy link

r-arias commented Dec 28, 2017

is there an easy way to find out, on which nightly the rls (or rustfmt) last built successfully and are included?

@DSpeckhals
Copy link
Contributor

Here's the best way yet to view the status of the RLS and other tools -- this was implemented by @kennytm not long ago, and it's official.

https://rust-lang-nursery.github.io/rust-toolstate/

@marcusball
Copy link

I whipped up a quick copy of the above script for Powershell:

$daysOffset = 0
While ($daysOffset -gt -100) {
    Write-Host " === === === "
    $rustDate = (Get-Date).AddDays($daysOffset).ToString("yyyy-MM-dd")
    Write-Host "Checking $rustDate..."

    # Mimic `curl -s`
    $progressPreference = 'silentlyContinue'
    $response = Invoke-WebRequest "https://static.rust-lang.org/dist/$rustDate/channel-rust-nightly.toml"

    if($response.StatusCode -ne 200) {
        Write-Host "Rust $rustDate does not exist"
    }
    else {
        if((Select-String -Pattern "rls" -InputObject $response.RawContent) -and `
           (Select-String -Pattern "fmt" -InputObject $response.RawContent) ) {
           echo "Rust $rustDate has both rls and rustfmt"
           echo "Run ""rustup default nightly-$rustDate"" to install it"
           break;
        }
    }
    $daysOffset -= 1;
}

@ivstas
Copy link

ivstas commented Jan 28, 2018

Latest update on this: https://internals.rust-lang.org/t/nightlies-missing-the-rls-will-no-longer-be-produced/6653/3
TLDR: there would be no nightly builds missing RLS.

Just use latest rustup version:

  1. rustup self update
  2. rustup update

@elichai
Copy link

elichai commented Sep 16, 2018

I have the same problem:

$ rustup self update
info: checking for self-updates

$ rustup update
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2018-09-15, rust version 1.30.0-nightly (2ab3eba30 2018-09-14)
error: component 'rls-preview' for 'x86_64-unknown-linux-gnu' is unavailable for download
info: checking for self-updates

       stable-x86_64-unknown-linux-gnu unchanged - rustc 1.29.0 (aa3ca1994 2018-09-11)
  nightly-x86_64-unknown-linux-gnu update failed - rustc 1.29.0-nightly (6a1c0637c 2018-07-23)

$ rustup update nightly
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2018-09-15, rust version 1.30.0-nightly (2ab3eba30 2018-09-14)
error: component 'rls-preview' for 'x86_64-unknown-linux-gnu' is unavailable for download

@r-arias
Copy link

r-arias commented Sep 16, 2018

I have the same problem:

error: component 'rls-preview' for 'x86_64-unknown-linux-gnu' is unavailable for download

@elichai If I understood correctly, that is actually not the problem but a solution to it. Before, you would have gotten the current nightly for which the RLS did not compile. Now you just don't get that nightly, anymore. Every recent nightly that you get through rustup has a working RLS. Wait a day and it will be fixed (it is now, I think) or go back to an older nightly a few days back :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests