Skip to content
This repository was archived by the owner on Dec 8, 2020. It is now read-only.
This repository was archived by the owner on Dec 8, 2020. It is now read-only.

RLS installation assumes rustup can self-update #225

Closed
@mixedCase

Description

@mixedCase

Version of VSCode: 1.12.2
Version of the extension: 0.3.14
OS: Arch Linux

Description:

I use rustup from my distro's software repository and handle updates from there. vscode-rust assumes it can self-update rustup but this is not the case for the version I use, and going by the "Rust logging" output, this usecase seems to be explicitly handled by rustup.

vscode-rust should probably recognize this behavior and only suggest the user to check for system updates, or at least allow the RLS installation to continue without forcing the rustup update.

Output of the "Rust logging" channel:

DEBUG: Configuration: Rustup: create: sysroot=/home/mixedcase/.local/share/multirust/toolchains/stable-x86_64-unknown-linux-gnu
DEBUG: Configuration: Rustup: updateComponents: this.components=["cargo-x86_64-unknown-linux-gnu (default)","rust-docs-x86_64-unknown-linux-gnu","rust-src (installed)","rust-std-aarch64-apple-ios","rust-std-aarch64-linux-android","rust-std-aarch64-unknown-linux-gnu","rust-std-arm-linux-androideabi","rust-std-arm-unknown-linux-gnueabi","rust-std-arm-unknown-linux-gnueabihf","rust-std-arm-unknown-linux-musleabi","rust-std-arm-unknown-linux-musleabihf","rust-std-armv7-apple-ios","rust-std-armv7-linux-androideabi","rust-std-armv7-unknown-linux-gnueabihf","rust-std-armv7-unknown-linux-musleabihf","rust-std-armv7s-apple-ios","rust-std-asmjs-unknown-emscripten","rust-std-i386-apple-ios","rust-std-i586-pc-windows-msvc","rust-std-i586-unknown-linux-gnu","rust-std-i686-apple-darwin","rust-std-i686-linux-android","rust-std-i686-pc-windows-gnu","rust-std-i686-pc-windows-msvc","rust-std-i686-unknown-freebsd","rust-std-i686-unknown-linux-gnu","rust-std-i686-unknown-linux-musl","rust-std-mips-unknown-linux-gnu","rust-std-mips-unknown-linux-musl","rust-std-mips64-unknown-linux-gnuabi64","rust-std-mips64el-unknown-linux-gnuabi64","rust-std-mipsel-unknown-linux-gnu","rust-std-mipsel-unknown-linux-musl","rust-std-powerpc-unknown-linux-gnu","rust-std-powerpc64-unknown-linux-gnu","rust-std-powerpc64le-unknown-linux-gnu","rust-std-s390x-unknown-linux-gnu","rust-std-wasm32-unknown-emscripten","rust-std-x86_64-apple-darwin","rust-std-x86_64-apple-ios","rust-std-x86_64-pc-windows-gnu","rust-std-x86_64-pc-windows-msvc","rust-std-x86_64-rumprun-netbsd","rust-std-x86_64-unknown-freebsd","rust-std-x86_64-unknown-linux-gnu (default)","rust-std-x86_64-unknown-linux-musl","rust-std-x86_64-unknown-netbsd","rustc-x86_64-unknown-linux-gnu (default)",""]
DEBUG: Configuration: Rustup: updatePathToRlsExecutable: rlsInstalled=false
DEBUG: askPermissionToInstallRls: choice=Install RLS
DEBUG: handleMissingRls: permissionToInstallRlsGranted=true
DEBUG: handleMissingRls: permissionToUpdateRustupGranted=true
ERROR: Configuration: Rustup: invokeRustup: rustup self update exited with code=1, but zero is expected. This should not have happened. stderrData=error: self-update is disabled for this build of rustup
error: you should probably use your system package manager to update rustup

DEBUG: handleMissingRls: rustupUpdated=false
DEBUG: Configuration: updatePathToRacer: findRacerPathSpecifiedByUser: path=undefined
DEBUG: Configuration: updatePathToRacer: findDefaultRacerPath: foundPath=/usr/bin/racer
DEBUG: Legacy Mode Manager: MissingToolsInstallator: getMissingTools(): pathDirectories=["/mnt/DataHDD/go/bin","/home/mixedcase/.local/share/cargo/bin","/home/mixedcase/.bin","/home/mixedcase/.local/share/npm-packages/bin","/mnt/DataHDD/go/bin","/home/mixedcase/.local/share/cargo/bin","/home/mixedcase/.bin","/home/mixedcase/.local/share/npm-packages/bin","/usr/local/sbin","/usr/local/bin","/usr/bin","/opt/android-ndk","/opt/android-sdk/tools","/opt/android-sdk/tools/bin","/opt/cuda/bin","/usr/lib/jvm/default/bin","/usr/bin/site_perl","/usr/bin/vendor_perl","/usr/bin/core_perl"]
DEBUG: Legacy Mode Manager: MissingToolsInstallator: getMissingTools(): tools={"racer":"/usr/bin/racer","rustfmt":"rustfmt","rustsym":"rustsym"}
DEBUG: Legacy Mode Manager: MissingToolsInstallator: getMissingTools(): racer's path=/usr/bin/racer
DEBUG: Legacy Mode Manager: MissingToolsInstallator: getMissingTools(): this.missingTools = []
DEBUG: Legacy Mode Manager: CompletionManager: start: enter
DEBUG: Legacy Mode Manager: CompletionManager: start: racerPath=/usr/bin/racer
DEBUG: Legacy Mode Manager: CompletionManager: start: ENV[RUST_SRC_PATH] = /home/mixedcase/.local/share/multirust/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src

Activity

KalitaAlexey

KalitaAlexey commented on May 4, 2017

@KalitaAlexey
Member

@mixedCase,
I didn't know that.
As a workaround you can install rls and rust-analysis by yourself.

mixedCase

mixedCase commented on May 5, 2017

@mixedCase
Author

@KalitaAlexey I did so with the exact commands from the rls readme, but am still told by VSCode it isn't installed.

KalitaAlexey

KalitaAlexey commented on May 5, 2017

@KalitaAlexey
Member

@mixedCase,
Which commands did you use?
What rustup component list gives?

mixedCase

mixedCase commented on May 5, 2017

@mixedCase
Author

Ran:

rustup update nightly
rustup component add rls --toolchain nightly
rustup component add rust-analysis --toolchain nightly
rustup component add rust-src --toolchain nightly

Component list:

$ rustup component list                              
cargo-x86_64-unknown-linux-gnu (default)
rust-docs-x86_64-unknown-linux-gnu
rust-src (installed)
rust-std-aarch64-apple-ios
rust-std-aarch64-linux-android
rust-std-aarch64-unknown-linux-gnu
rust-std-arm-linux-androideabi
rust-std-arm-unknown-linux-gnueabi
rust-std-arm-unknown-linux-gnueabihf
rust-std-arm-unknown-linux-musleabi
rust-std-arm-unknown-linux-musleabihf
rust-std-armv7-apple-ios
rust-std-armv7-linux-androideabi
rust-std-armv7-unknown-linux-gnueabihf
rust-std-armv7-unknown-linux-musleabihf
rust-std-armv7s-apple-ios
rust-std-asmjs-unknown-emscripten
rust-std-i386-apple-ios
rust-std-i586-pc-windows-msvc
rust-std-i586-unknown-linux-gnu
rust-std-i686-apple-darwin
rust-std-i686-linux-android
rust-std-i686-pc-windows-gnu
rust-std-i686-pc-windows-msvc
rust-std-i686-unknown-freebsd
rust-std-i686-unknown-linux-gnu
rust-std-i686-unknown-linux-musl
rust-std-mips-unknown-linux-gnu
rust-std-mips-unknown-linux-musl
rust-std-mips64-unknown-linux-gnuabi64
rust-std-mips64el-unknown-linux-gnuabi64
rust-std-mipsel-unknown-linux-gnu
rust-std-mipsel-unknown-linux-musl
rust-std-powerpc-unknown-linux-gnu
rust-std-powerpc64-unknown-linux-gnu
rust-std-powerpc64le-unknown-linux-gnu
rust-std-s390x-unknown-linux-gnu
rust-std-wasm32-unknown-emscripten
rust-std-x86_64-apple-darwin
rust-std-x86_64-apple-ios
rust-std-x86_64-pc-windows-gnu
rust-std-x86_64-pc-windows-msvc
rust-std-x86_64-rumprun-netbsd
rust-std-x86_64-unknown-freebsd
rust-std-x86_64-unknown-linux-gnu (default)
rust-std-x86_64-unknown-linux-musl
rust-std-x86_64-unknown-netbsd
rustc-x86_64-unknown-linux-gnu (default)
KalitaAlexey

KalitaAlexey commented on May 5, 2017

@KalitaAlexey
Member

@mixedCase,
What rustup show shows?
I suppose you use the stable toolchain and that's the problem.

KalitaAlexey

KalitaAlexey commented on May 5, 2017

@KalitaAlexey
Member

I didn't know about --toolchain nightly. It seems promising.

mixedCase

mixedCase commented on May 5, 2017

@mixedCase
Author

I checked with rustup show and apparently my nightly didn't get updated from the last time I toyed with it, looks like I hit this: rust-lang/rustup#1092

When that gets fixed I'll continue diagnosing the issue.

mixedCase

mixedCase commented on May 5, 2017

@mixedCase
Author

I just worked around the issue by pinning to an older nightly and I can confirm one thing: vscode-rust does not recognize RLS if the default toolchain is stable, even if RLS was successfully installed with the nightly toolchain.

I tried switching back and forth from stable to nightly as the default and analysis works only on nightly, even if that's the old nightly I keep around rather than the nightly I built RLS with.

KalitaAlexey

KalitaAlexey commented on May 5, 2017

@KalitaAlexey
Member

Yes, I know that.

mixedCase

mixedCase commented on May 5, 2017

@mixedCase
Author

Should I open another bug for that? RLS by itself supports stable, even if it requires nightly to compile.

KalitaAlexey

KalitaAlexey commented on May 5, 2017

@KalitaAlexey
Member

Rustup does support RLS only for the nightly toolchain.
You shouldn't open a bug. It's already opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mixedCase@KalitaAlexey

        Issue actions

          RLS installation assumes rustup can self-update · Issue #225 · editor-rs/vscode-rust