-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
prelude
unavailable in latest rust-analyzer releases
#18423
Comments
This does indeed look like chalk hanging up, though we haven't done anything special here I think. Given the very new rustc version it might be some change in the standard library |
Unresolved macros don't indicate Chalk though, do they 🤔 The example project has a rust-toolchain.toml with specific components, I'm not sure whether that means rust-src will be included? |
i was going off of the linked log (in the rep) but that might not even be relevant on a second look |
I just tried to explicitly add rust-src (it's being installed), no change.
|
but the problem during resolve is simply that |
I imagine this doesn't help much but I am also seeing similar / identical issues on neovim.
NVIM v0.10.2 nightly-x86_64-unknown-linux-gnu (default) I noticed the issue by |
Is this happening for older rust nightlies as well? (since both of you posted rustc 1.84.0-nightly (df4ca44d3 2024-10-27)) |
I accidentally actually used Hope that helps! |
Using This commit is the likely candidate where it all stopped working. (The command I used was: I was sadly not able to drill down further which commit is the culprit. I'll investigate further.
I got - when trying to see if the unrolled builds worked:
|
My current hunch is that it has something to do with: rust-lang/rust#131857, I enabled debug logs in VSCode and looked through it, and I found a bunch of repeating |
The lockfile version bump also looks interesting, but it doesn't seem to cause problems in stable Cargo. I don't see a way for rust-lang/rust#131857 to affect us. |
That PR has no effect for us, it doesnt touch the std lib nor any compiler crates we use |
Okay, so, I got a bit desperate and removed a bunch of old cargo binaries, while doing so it turned out that my default toolchain (nightly) was way behind (1.77-nightly) updating the default toolchain to the newest one (2024-11-01) seems to have solved the problem. I do not know how that solved the problem, and also don't understand how the default toolchain installed via rustup would influence RA. Mysterious. |
Since a couple of days, the prelude has been missing from my installation, a complete re-install via rustup, removing the
target
folder (either by deleting it orcargo clean
), and clearing cargo cache all didn't help.I did a tiny bit of dissecting, and the problem started appearing between
rust-analyzer 1.84.0-nightly (3ed6e3cc 2024-10-17)
andrust-analyzer 1.84.0-nightly (e92993db 2024-10-18)
, using any rust-analyzer version prior to 2024-10-18 does not result in the issue.The issue is that the prelude is seemingly missing, prelude types such as
Option
are not imported/shown. I've attached examples of what I mean.This also propagates to macros such as
tracing
, where I am getting errors, such as: unresolved macroline
(macro-error), see the picture below.The logs seem to indicate that RA is stuck during some kind of resolution (the log has been uploaded as an LFS object into the regression repository).
rust-analyzer version: rust-analyzer 1.84.0-nightly (df4ca44d 2024-10-27)
rustc version: rustc 1.84.0-nightly (df4ca44d3 2024-10-27)
editor or extension: Zed, replicated in Zed Preview and VSCode
relevant settings:
RA_LOG=info
repository link: https://github.com/indietyp/rust-analyzer-regressions/tree/prelude-missing, branch prelude missing
The text was updated successfully, but these errors were encountered: