-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Request textDocument/inlayHint failed #13372
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
Comments
This is caused by our inlay hint resolve payload not being "versioned", that is a client might ask for a resolve of an inlay hint and change the text content right after/before such that r-a tries to resolve the inlay hint on a different document version. |
To properly assign the blame here, the client is right. For "two-phase lookups" with resolve, it is in genera not possible to guarantee that there are no intervening changes which would invalidated the lookup. That's why:
|
Turns out what I wrote here is a different issue, #13170 is the issue that I was describing. Whats happening here I think is that we get an inlay hints request, then the client sends a document changed notification causing us to cancel the inlay hints request, change the docs and then retry the inlay hints request, now with outdated document positions ... So our request retrying breaks down hmm ... |
I have the same problem even with basic code in Bevy:
Rust: 1.67.0 |
Is there any workaround ? That popups are very annoying. Thanks, |
@pascaldanek what's the full error you are getting, and when? |
@lnicola it seems to be totaly random when I edit Rust code:
PS: I add that since a few days my rust dev experience in vscode has become very slow for a (yet) unknown reason. |
fix: Do not retry inlay hint requests Should close #13372, retrying the way its currently implemented is not ideal as we do not adjust offsets in the requests, but doing that is a major PITA, so this should at least work around one of the more annoying issues stemming from it.
Can this popup be removed or disabled, it's constantly getting in the way, I don't care if it fails because it took too long and got outdated information, it can retry again next save, just stop stacking popups that don't disappear on the screen. |
When working in rustc, I often see an error pop up in the corner which says "Request textDocument/inlayHint failed". I am not entirely sure how to reproduce this, or what it even is talking about. The pop up has a "show output" button, and when I press that button I see a log which ends in
I think I also saw this in Miri, but I am not entirely sure about that.
rust-analyzer version: rust-analyzer version: 0.3.1221-standalone
rustc version: rustc 1.66.0-nightly (c97d02cdb 2022-10-05)
relevant settings:
user settings
workspace settings
The text was updated successfully, but these errors were encountered: