add rust-analyzer to toolchain file and choose working nightly version - #344
BennoLossin wants to merge 1 commit into
Conversation
| [toolchain] | ||
| channel = "nightly-2025-12-01" | ||
| components = ["rustfmt"] | ||
| channel = "nightly-2025-11-24" |
There was a problem hiding this comment.
Wait. Why did you change this back? That date comes from mini-rust so I don't want to change it.
There was a problem hiding this comment.
I ran a bisect on the r-a version and 2025-11-25 is the earliest that's failing. Some more details on zulip: https://rust-lang.zulipchat.com/#narrow/channel/402470-t-types.2Fformality/topic/rust-analyzer.20errors/near/590543291
There was a problem hiding this comment.
Hmm. So basically there's some bug in rust-analyzer we are working around?
There was a problem hiding this comment.
This likely stems from rust-lang/rust-analyzer#21097 and some encoding mismatch between the client and server versions. At this point I think we consider this acceptable breakage as the toolchain version you are using is so much older than current rust-analyzer. As for why 2025-12-01 is specifically not working, there were a bunch of bugs after this PR that we slowly fixed, so it might very well be that this nightly range is just overall broken wrt to proc-macros
There was a problem hiding this comment.
I think the reason for pinning it to the December version is mini-rust (or a dependency)? So also including rust-analyzer in that should be correct, right?
So @nikomatsakis we can maybe "just" merge this and then later increment the pinned version to one that works (since mini-rust or the dependency was incremented by Ralf IIRC)?
There was a problem hiding this comment.
Yea, including rust-analyzer there will make VSCode pick up the corresponding rust-analyzer instead of using the bundled one. (zed iirc does not do that yet)
Ideally you'd do that AND update mini-rust and friends so you can bump the toolchain file to a nightly where r-a isn't as buggy
33c15a8 to
678aa8a
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
I haven't followed the repo updates, do we still need this PR? |
|
I just checked this again, I still get errors without this patch, so I'll leave this open. I think regardless of which rust version we end up pinning, rust-analyzer should also be pinned, since then it won't stop working in the future. If we don't end up pinning the Rust version, then I think we can close this. |
^ generally if you pin your toolchain you want to add the rust-analyzer component to the toolchain file #369 fixes the r-a errors for you fwiw, the current pinned toolchain just has a buggy r-a |
|
Closing in favor of #369 |
fixes the errors rust-analyzer was displaying for judgement functions on my side. Would appreciate some testing from other people especially non-nix users.