Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upRLS only compiles the first member of a Cargo workspace #876
Comments
This comment has been minimized.
This comment has been minimized.
|
I'm seeing great success with the |
This comment has been minimized.
This comment has been minimized.
|
The bogofile errors are not important - we deal with them internally. They are fixed on master where we've updated to the latest Racer (the rustc_ap_syntax version). I'm not sure about the panics, could you run with RUST_BACKTRACE=1 so we can get more detail please? The workspace issues are worrying and interesting. We should be checking all workspaces which are changed. Could you tell me a bit more about the project structure please? Does it look like a or b or something else:
Are there things like multiple binaries, redirected directories, build scripts, etc? When you build the project outside of the RLS, what commandline do you use (just Which directory are you opening in VSCode? The top-level (project) directory, one of the workspace directories, or one of the src directories? |
This comment has been minimized.
This comment has been minimized.
|
Yes I will get a backtrace for you. And I realize I gave very little information, apologies...I was about to do so. But I have never had success with RLS even with a simple project, but that was several months ago and I know a lot of fixes have happened since then. The structure is more like
and the root
There are multiple binaries as you can see. No redirected directories, but all of the When I build the project, I build typically from the root directory and specify I open the root directory in VSCode, e.g. Hope this helps. |
This comment has been minimized.
This comment has been minimized.
|
Should I be putting a |
This comment has been minimized.
This comment has been minimized.
|
Not that this should change the behavior I am seeing, but I am about to reorganize the |
This comment has been minimized.
This comment has been minimized.
You shouldn't have to do anything different for the RLS vs the CLI, as long as you are running the RLS in the same directory you build in (which it sounds like you are). This might be why the RLS is getting stuck though. Thanks for the additional info! |
This comment has been minimized.
This comment has been minimized.
|
And one more question: when you are seeing the RLS build the "first" workspace but not building the modified workspaces, which are they in your diagram? |
This comment has been minimized.
This comment has been minimized.
|
It builds the |
This comment has been minimized.
This comment has been minimized.
|
Is the repo you're building public? If so, could I get a URL please? |
alexheretic
added a commit
to alexheretic/rusttmp
that referenced
this issue
Jun 19, 2018
alexheretic
added a commit
to alexheretic/rusttmp
that referenced
this issue
Jun 19, 2018
This comment has been minimized.
This comment has been minimized.
|
I've also been seeing this issue with workspace projects. For example a project with a lib workspace dependency, and a main binary.
You can only see the new main diagnostics after a change to main or restarting rls. I created https://github.com/alexheretic/rusttmp/tree/rls-876 to provide a simple way to reproduce this. STR
|
nrc
added this to the 1.0 milestone
Jun 21, 2018
nrc
added
the
P-high
label
Jul 10, 2018
This comment has been minimized.
This comment has been minimized.
|
Looked at this today using the STR above: This is caused by @nrc this was introduced in 8c77584 to detect edited innermost crate and minimize rebuilding. |
This comment has been minimized.
This comment has been minimized.
It sounds like it should
I'm not sure what you're saying or asking here? Do you think the above plan won't work? Or that it will work better than the previous attempt? |
This comment has been minimized.
This comment has been minimized.
|
Thanks for continuing work on this all. Just confirming here that I am still seeing the same behavior as of tonight. |
This comment has been minimized.
This comment has been minimized.
|
Working on it atm. |
This was referenced Jul 29, 2018
bors
added a commit
to rust-lang/cargo
that referenced
this issue
Jul 29, 2018
Xanewok
closed this
in
#969
Aug 1, 2018
This comment has been minimized.
This comment has been minimized.
|
While the fix is merged and it seems to be working now (added a regression test), I'd be really glad if folks could try and test it (by using built-from-source RLS) to see if some cases might have slipped through. |



jnicholls commentedMay 20, 2018
I open my Cargo workspace into VSCode (just as a directory, not as an official project or workspace or anything) and RLS will compile and check all members of the Cargo workspace as its first action. However after that, with code changes et al, only the first member of the workspace is inspected. That is, I only see in the bottom left status the first member get recompiled, but not any of the other members including the ones into which I am writing intentional syntax errors to test :) If I do syntax errors in the first member, RLS picks them up and reports them accordingly.
I am also seeing this output regularly:
I get those
request-worker-N panickedmessages a lot, every time I type and RLS tries to do type completion it seems.Also these every time I type:
The RLS that is running is from the nightly toolchain, installed today. Any ideas why I would be seeing these issues? The workspace itself is not that large or special. I am surprised these problems aren't being seen by others as they seem fundamental and are happening on a fresh install.