autozimu / LanguageClient-neovim

Language Server Protocol (LSP) support for vim and neovim.
MIT License
3.55k stars 273 forks source link

Why pin Rust toolchain version? #1219

Closed Logarithmus closed 3 years ago

Logarithmus commented 3 years ago

Hello, I've cloned the repo to make some changes to the code. After opening neovim I saw rust-analyzer rebuilding everything, sccache reporting cache misses and rustc 1.50 running, instead of 1.51. I found out that, for some reason, LanguageClient-neovim pins it's toolchain to 1.50.0 in https://github.com/autozimu/LanguageClient-neovim/blob/next/rust-toolchain.

What's the reason for doing that? AFAIK Rust guarantees backwards compatibility, as long as you use the same Rust edition (the current edition is 2018, though 2021 is coming soon).

ulidtko commented 3 years ago

Ehh, I think you meant to say 1.46.0 (not 1.50.0):

https://github.com/autozimu/LanguageClient-neovim/blob/a42594c9c320b1283e9b9058b85a8097d8325fed/rust-toolchain#L1

Which is definitely behind current stable on rustup:

$ rustup run stable rustc --version
rustc 1.51.0 (2fd73fabe 2021-03-23)

I was working on a fix of an issue, stumbled on exactly this, and wondered the same. Thankfully, it all Just Works and gives no big pains apart from a bit extra weight in ~/.rustup and broken clippy.

A little sad to observe that the last version bump here was whopping 8 months ago (which is almost nothing in terms of volunteered OSS maintenance timeframes) — the Rust train is moving crazy fast already.

Logarithmus commented 3 years ago

I was talking about dev branch. It uses rust-1.50.0

On Mon, 2021-05-03 at 16:48 -0700, Maxim Ivanov wrote:

Ehh, I think you meant to say 1.46.0 (not 1.50.0): https://github.com/autozimu/LanguageClient-neovim/blob/a42594c9c320b1283e9b9058b85a8097d8325fed/rust-toolchain#L1 Which is definitely behind current stable on rustup: $ rustup run stable rustc --version rustc 1.51.0 (2fd73fabe 2021-03-23) I was working on a fix of an issue, stumbled on exactly this, and wondered the same. Thankfully, it all Just Works and gives no big pains apart from a bit extra weight in ~/.rustup and broken clippy. A little sad to observe that the last version bump here was whopping 8 months ago (which is almost nothing in terms of volunteered OSS maintenance timeframes) — the Rust train is moving crazy fast already. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

ulidtko commented 3 years ago

I was talking about dev branch. It uses rust-1.50.0

So you're suggesting not just a version bump, but unpinning it completely?

Logarithmus commented 3 years ago

Yes, I don't understand why pin it because as I said already, Rust is backwards compatible as long as you use the same Rust edition (e. g. 2018).

On Mon, 2021-05-03 at 16:58 -0700, Maxim Ivanov wrote:

I was talking about dev branch. It uses rust-1.50.0 So you're suggesting not just a version bump, but unpinning it completely? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

martskins commented 3 years ago

I'm not sure as to why it was pinned to begin with, but I think I'm ok with unpinning it as well, it would make more sense if we were using nightly, but given we use stable I think it should be fine for us to unpin. If any of you want to open a PR, happy to merge, otherwise I'll do that at some point this week.

ulidtko commented 3 years ago

Hasn't autoclosed by the merge for some reason. Close manually?..

Logarithmus commented 3 years ago

Hasn't autoclosed by the merge for some reason. Close manually?..

Autoclosing works for the default branch only. The default branch for this repo is next, but my commit has been pushed into dev.