Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

RLS panics when invoked from master rls-vscode #477

Closed
tchebb opened this issue Dec 17, 2018 · 7 comments
Closed

RLS panics when invoked from master rls-vscode #477

tchebb opened this issue Dec 17, 2018 · 7 comments

Comments

@tchebb
Copy link
Contributor

tchebb commented Dec 17, 2018

cb2206e ("Add missing full_docs and show_hover_context config keys") exposed a bug in RLS where it panics when full_docs is specified as null. I have submitted rust-lang/rls#1192 to fix the bug in RLS; however, it might be prudent to revert cb2206e or specify false instead of null for full_docs so as to not break users who don't update RLS.

Example panic:

thread '<unnamed>' panicked at 'internal error: entered unreachable code', src/config.rs:111:33
@olix0r
Copy link

olix0r commented Mar 16, 2019

I'm seeing a similar panic using version 0.5.4:

thread '<unnamed>' panicked at 'internal error: entered unreachable code', src/tools/rls/src/config.rs:111:33
note: Run with `RUST_BACKTRACE=1` for a backtrace.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "PoisonError { inner: .. }"', src/libcore/result.rs:1009:5
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "PoisonError { inner: .. }"', src/libcore/result.rs:1009:5
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "PoisonError { inner: .. }"', src/libcore/result.rs:1009:5

@tchebb
Copy link
Contributor Author

tchebb commented Mar 16, 2019

This is weird; I'm not able to reproduce this issue now even though it should be present on my system.

Regardless, RLS doesn't seem to have released the fix on their end for this issue yet (although it is in master). As a temporary workaround, specify rust.full_docs in settings.json to be either true or false (false is supposed to be the default). The bug is that, when we pass null for that option to RLS, it fails to set the default internally and crashes, so explicitly specifying the setting should fix it.

@Xanewok
Copy link
Member

Xanewok commented Mar 16, 2019

That's weird, RLS stable should contain the fix from rust-lang/rls#1192. Which RLS version are you using?

@tchebb
Copy link
Contributor Author

tchebb commented Mar 16, 2019

@Xanewok ah, that would explain why I couldn't reproduce it. I didn't see my fix in the latest RLS release tag, but I must have been looking at the wrong thing.

@Xanewok
Copy link
Member

Xanewok commented Mar 16, 2019

Yeah, my bad - we stopped tracking git releases and just ride the trains with regular Rust releases. It might be worth doing that again.

@olix0r what is your rls --version?

@olix0r
Copy link

olix0r commented Mar 16, 2019

@Xanewok I was probably on a slightly older version -- since commenting I updated to the most recent I don't see the issue anymore.

@Xanewok
Copy link
Member

Xanewok commented Mar 17, 2019

Glad to hear that! I'll close this issue, then.

@Xanewok Xanewok closed this as completed Mar 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants