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

extension does not work with VSCode 1.18.0 #188

Closed
Geobert opened this issue Nov 10, 2017 · 25 comments
Closed

extension does not work with VSCode 1.18.0 #188

Geobert opened this issue Nov 10, 2017 · 25 comments
Labels

Comments

@Geobert
Copy link

Geobert commented Nov 10, 2017

updated VSCode to 1.18.0 and Rust (rls) to 0.3.2 and apart of syntax highlight, nothing seems to work:
go to definition
find references

etc.

tested on Win 10 64bits

@senden9
Copy link

senden9 commented Nov 10, 2017

Same effect as in #186? So a spinning "RLS: working"? If yes this is maybe a duplicate.

@Geobert
Copy link
Author

Geobert commented Nov 10, 2017

Nope, RLS: done here

@AnyCPU
Copy link

AnyCPU commented Nov 10, 2017

the same #185

@forbjok
Copy link

forbjok commented Nov 10, 2017

Having the same issue.

In the "Rust Language" output pane, it shows the following error:

thread '<unnamed>' panicked at 'need to specify SYSROOT or RUSTC env vars, or rustc must be in PATH', src\libcore\option.rs:839:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.

which seems to indicate that it can't find "rustc", but it is definitely in my PATH.

@nrc
Copy link
Member

nrc commented Nov 10, 2017

There's a fix on master which should address this. Currently waiting for it to get processed through the Rust infra and hit rustup. Fingers crossed that fixes things here.

@nrc nrc added the bug label Nov 10, 2017
@wangii
Copy link

wangii commented Nov 11, 2017

fixed in today's nightly build. let's hope it'll not happen again.

@Geobert
Copy link
Author

Geobert commented Nov 11, 2017

Is that supposed to fix VS Code Rust (rls) plugin?

@Yanpas
Copy link

Yanpas commented Nov 12, 2017

Hover, real-time errors and refactoring do not work anymore

@paukul
Copy link

paukul commented Nov 27, 2017

same here: hover, errors etc. not working anymore. Is the cause for this known? Anything one can do to help?

@Yanpas
Copy link

Yanpas commented Nov 27, 2017

@paukul They started to work after:

  1. I ran rustup update and updated everything I could
  2. Switched rls to stable in vs code settings
  3. Added misssing dll's to PATH for my project

@paukul
Copy link

paukul commented Nov 27, 2017

FYI: after enabling logging, I noticed the following errors piling up in the rls.logs:

thread 'rustc' panicked at 'Could not deserialize save-analysis config: MissingFieldError("reachable_only")', src/libcore/result.rs:906:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.

error: internal compiler error: unexpected panic

@Yanpas how did you switch to stable rls?

@paukul
Copy link

paukul commented Nov 27, 2017

this error seems to be known: rust-lang/rust#46244

@paukul
Copy link

paukul commented Nov 27, 2017

@Yanpas cheers, switching it to stable for now fixed the issue and made it work again, thanks.
For everyone who's curious:

 "rust-client.channel": "stable"

in the (workspace) settings

@oleid
Copy link

oleid commented Nov 28, 2017

It doesn't work for me - neither with stable, nor with nightly-2017-11-15-x86_64-unknown-linux-gnu. rls, however, works with the later. I get some output like:

{"message":"unused import: `c_int`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"sync/prog/gpgpu/stochastic_particles/compute_kernel/lib.rs","byte_start":53,"byte_end":58,"line_start":4,"line_end":4,"column_start":12,"column_end":17,"is_primary":true,"text":[{"text":"use libc::{c_int};","highlight_start":12,"highlight_end":17}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[{"message":"#[warn(unused_imports)] on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":null}
{"message":"unused import: `ndarray::prelude::*;`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"sync/prog/gpgpu/stochastic_particles/compute_kernel/lib.rs","byte_start":65,"byte_end":85,"line_start":5,"line_end":5,"column_start":5,"column_end":25,"is_primary":true,"text":[{"text":"use ndarray::prelude::*;","highlight_start":5,"highlight_end":25}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[{"message":"#[warn(unused_imports)] on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":null}
{"message":"missing field `positions` in initializer of `root::SimulationState`","code":{"code":"E0063","explanation":"\nThis error indicates that during an attempt to build a struct or struct-like\nenum variant, one of the fields was not provided. Erroneous code example:\n\n```compile_fail,E0063\nstruct Foo {\n    x: i32,\n    y: i32,\n}\n\nfn main() {\n    let x = Foo { x: 0 }; // error: missing field: `y`\n}\n```\n\nEach field should be specified exactly once. Example:\n\n```\nstruct Foo {\n    x: i32,\n    y: i32,\n}\n\nfn main() {\n    let x = Foo { x: 0, y: 0 }; // ok!\n}\n```\n"},"level":"error","spans":[{"file_name":"sync/prog/gpgpu/stochastic_particles/compute_kernel/lib.rs","byte_start":745,"byte_end":766,"line_start":36,"line_end":36,"column_start":21,"column_end":42,"is_primary":true,"text":[{"text":"    let mut state = root::SimulationState {","highlight_start":21,"highlight_end":42}],"label":"missing `positions`","suggested_replacement":null,"expansion":null}],"children":[],"rendered":null}
{"message":"mismatched types","code":{"code":"E0308","explanation":"\nThis error occurs when the compiler was unable to infer the concrete type of a\nvariable. It can occur for several cases, the most common of which is a\nmismatch in the expected type that the compiler inferred for a variable's\ninitializing expression, and the actual type explicitly assigned to the\nvariable.\n\nFor example:\n\n```compile_fail,E0308\nlet x: i32 = \"I am not a number!\";\n//     ~~~   ~~~~~~~~~~~~~~~~~~~~\n//      |             |\n//      |    initializing expression;\n//      |    compiler infers type `&str`\n//      |\n//    type `i32` assigned to variable `x`\n```\n"},"level":"error","spans":[{"file_name":"sync/prog/gpgpu/stochastic_particles/compute_kernel/lib.rs","byte_start":811,"byte_end":819,"line_start":39,"line_end":39,"column_start":23,"column_end":31,"is_primary":true,"text":[{"text":"        root::RunDemo(settings, state) == 0","highlight_start":23,"highlight_end":31}],"label":"expected *-ptr, found struct `root::SimulationSettingsBase`","suggested_replacement":null,"expansion":null}],"children":[{"message":"expected type `*const root::SimulationSettingsBase`\n   found type `root::SimulationSettingsBase`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":null}
{"message":"mismatched types","code":{"code":"E0308","explanation":"\nThis error occurs when the compiler was unable to infer the concrete type of a\nvariable. It can occur for several cases, the most common of which is a\nmismatch in the expected type that the compiler inferred for a variable's\ninitializing expression, and the actual type explicitly assigned to the\nvariable.\n\nFor example:\n\n```compile_fail,E0308\nlet x: i32 = \"I am not a number!\";\n//     ~~~   ~~~~~~~~~~~~~~~~~~~~\n//      |             |\n//      |    initializing expression;\n//      |    compiler infers type `&str`\n//      |\n//    type `i32` assigned to variable `x`\n```\n"},"level":"error","spans":[{"file_name":"sync/prog/gpgpu/stochastic_particles/compute_kernel/lib.rs","byte_start":821,"byte_end":826,"line_start":39,"line_end":39,"column_start":33,"column_end":38,"is_primary":true,"text":[{"text":"        root::RunDemo(settings, state) == 0","highlight_start":33,"highlight_end":38}],"label":"expected *-ptr, found struct `root::SimulationState`","suggested_replacement":null,"expansion":null}],"children":[{"message":"expected type `*mut root::SimulationState`\n   found type `root::SimulationState`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":null}
{"message":"aborting due to 3 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":null}

There is no output in the debugger console. This is my config:

{
    "rust.workspace_mode": true,
    "rust-client.logToFile": true,
    "rust.unstable_features": true,
    "rust-client.channel": "nightly-2017-11-15-x86_64-unknown-linux-gnu"
}

EDIT:

No, I think I'm hit by bug #200 . For some other project, errors are reported and this very project contains a build.rs file.

@leshow
Copy link

leshow commented Nov 29, 2017

I'm having this issue on the nightly compiler also, same error

thread 'rustc' panicked at 'Could not deserialize save-analysis config: MissingFieldError("reachable_only")', src/libcore/result.rs:906:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.

error: internal compiler error: unexpected panic

@oleid
Copy link

oleid commented Nov 29, 2017

@leshow : That's a bug in nightly rls, not the extension. Try an earlier version, i.e. by setting "rust-client.channel": "nightly-2017-11-15-x86_64-unknown-linux-gnu"

@paukul
Copy link

paukul commented Dec 1, 2017

works again in todays nightly

@fuszenecker
Copy link

Doesn't work with

nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.26.0-nightly (c9334404f 2018-03-05)

@Frederick888
Copy link

Frederick888 commented Mar 7, 2018

Is this again a bug in rls?

Perhaps a bit off-topic but since rustup has implemented "update only if installed components are all available", is it better to have some tests to prevent buggy rls's from being published?

@alexreg
Copy link

alexreg commented Mar 7, 2018

Okay, interestingly enough, everything seems to be working on stable and nightly now, since my last rustup update! Odd.

@Geobert
Copy link
Author

Geobert commented Mar 7, 2018

You are lucky, it's not working for me. nightly-x86_64-pc-windows-msvc unchanged - rustc 1.26.0-nightly (2789b067d 2018-03-06) or even stable

@nrc
Copy link
Member

nrc commented Mar 8, 2018

@Geobert @fuszenecker could you give some more details please?

is it better to have some tests to prevent buggy rls's from being published?

We do test every RLS we publish and publish working versions, furthermore we no longer publish nightly Rust without a working RLS. However, some problems aren't caught by our tests because they only occur on certain projects or platforms.

@Geobert
Copy link
Author

Geobert commented Mar 8, 2018

On cobalt.rs, with nightly-x86_64-pc-windows-msvc unchanged - rustc 1.26.0-nightly (2789b067d 2018-03-06). No find definition, nor find references. Completion seems to work though.

RLS works on a fresh simple project though

@Geobert
Copy link
Author

Geobert commented Mar 8, 2018

This project doesn't work neither (since end of Jan) https://github.com/Geobert/rusty_flexi

@Xanewok
Copy link
Member

Xanewok commented Apr 7, 2019

Right now the issue seems too vague - the extension has been working correctly for quite some time now. If you experience any problems, please make sure to file another issue with reproduction steps. Thanks!

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

No branches or pull requests