-
Notifications
You must be signed in to change notification settings - Fork 245
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
Simplify setup.{sh,bat} and work around rust-lang/rustup#2601. #332
Conversation
@khyperia mentioned we've gone back & forth on this, and it looks like the short form was suggested in #139 (comment), but then later reverted in d9838a0 and I don't know why. If there is a bug with |
Oh, #139 getting merged and d9838a0 were very close together, and I believe I found the context on Discord. Looks like for @repi $ rustup toolchain uninstall nightly-2020-11-24
info: uninstalling toolchain 'nightly-2020-11-24-x86_64-unknown-linux-gnu'
info: toolchain 'nightly-2020-11-24-x86_64-unknown-linux-gnu' uninstalled
$ ./setup.sh
info: syncing channel updates for 'nightly-2020-11-24-x86_64-unknown-linux-gnu'
info: latest update on 2020-11-24, rust version 1.50.0-nightly (d9a105fdd 2020-11-23) And when the toolchain exists, I can use verbose mode to see it downloads the right version: $ rustup component remove rust-src
info: removing component 'rust-src'
$ rustup -v component add rust-std rust-src
verbose: read metadata version: '12'
info: component 'rust-std' for target 'x86_64-unknown-linux-gnu' is up to date
info: downloading component 'rust-src'
verbose: downloading file from: 'https://static.rust-lang.org/dist/2020-11-24/rust-src-nightly.tar.xz' |
Think it was simply failing in CI before I did revert that and went back on installing explicit version. But may work now so that would be good! |
Current So I don't see how |
Looks like the whole Also, |
Looks like TOML works with RLS, but only because of a coincidence: rust-lang/rustup#2601 (comment) I guess I'll go the full TOML route, and I've opened NixOS/nixpkgs#106443 so that I can have a TOML-capable EDIT: I guess that means suggesting my local changes to #284. |
rustup component add
will install the toolchain if it isn't already, and will respectrust-toolchain
, so hardcoding the value fromrust-toolchain
intosetup.sh
andsetup.bat
isn't necessary.It also works around rust-lang/rustup#2601, which I've seen a handful of people hit (including myself), usually due to IDE integration installing the
rust-src
component usingrustup component add
, before./setup.sh
is ran.The inclusion of
rust-std
is a second level of workaround, it somehow avoids the problem described in rust-lang/rustup#2601 (comment), where running the newsetup.sh
/setup.bat
for the same toolchain that the oldsetup.sh
/setup.bat
was already ran (and it executedrustup toolchain install ... --component rust-src
, putting the components list in a broken/suboptimal state).More specifically, installing
rust-std
(even on its own) makesrustup
decide to remove the (wrong)rust-src-$host
component and install the (correct)rust-src
one, if the former happens to be installed.(The two versions of
rust-src
are the same component "package", only their names inlib/rustlib/components
differ)