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
Rust editor doesn't show errors #162
Comments
Hi! |
Restarting didn't help. The properties page also looks ok. However on startup if get an error notification of:
|
Interesting! I don't know how the RLS behaves when one of the dependent crate does not compile. Can you start the compilation from a run config to see if the error occurs then as well and which crate fails to compile with which error message? Thanks! |
Well that is the output of the initial comment. |
This is strange, can you fix the program, e.g. writing |
RLS stops working when it can't compile an upstream crate - this has been reported. You can try to run
from the root of your crate and at least see if there is a workaround for that specific crate. |
So I did check the settings you mentioned in #160, and I did remove the RPM containing rust:
It seems to pick up the correct binary as well:
When I do start
|
Looks correct! If you load the project in the IDE do you get the error in the problem list (and see the squiggles in the editor)? Do you still get "Cargo failed: Error compiling dependent crate"? If yes, can you try and run |
Hey @ctron can you provide a screenshot of your Rust properties page? Thanks! If the RLS from the command line yealds a correct result, but when invoked from command line it does no, I suspect a config error. Maybe on the initial start the system installation was picked up and now that you use the rustup installed version points to a wrong directory. |
Hey @ctron, thanks for providing the info. My guess is that the sysroot directory detection failed somehow. The default value set in the "Other installation" text box does not look correct. Can you select the "Other installation" radio button and set the 'sysroot' field to the correct location? The sysroot would be something like I don't know if the error message on startup produces an entry in the workspace .metadata/.log file. If it does, it would also be interesting to see those. |
Thanks for your help! So I did check the I also changed the settings to: By:
But then the same error comes up after the restart. |
Sorry, there was a misunderstanding. Please do not switch back to "Use Rustup" in your settings. This is just for the moment to find out if the manual setting works. If it works, we can try to find out why the automatic detection does not work. |
Thanks @ctron, so it does not seem to be a sysroot configuration error. Can you go into the preferences and go to page It is baffling that the RLS works from command line, but not when invoked from Eclipse. |
The output is here: RLS log output
|
Thanks @ctron! It seems a bit weird that the RLS output log the project dir as If you simply created a second project, then I am again clueless what happens here. Can you maybe also provide the content of your |
So you don't have dependencies declared, so either RLS has some strange error during startup and this occurres when it tries so build the dependant projects (even though there are none), or something is wrong with the standard lib (which seems less plausible). This is getting hard to diagnose. Maybe you can set the following env variable |
Ok ... now I got something. The Et voilà … now I got the error in the editor. Re-starting again from the file manager, and I do run into the same issue again. So I definitely can re-produce this now. Unfortunately the error highlighting works, the IDE stalls with a "timeout" exception towards the language server and fails to "index". But that is another issue for another day. |
@ctron, to come back to the issue: I am puzzled why it works from the command line, but not when started from the file manager. This is more of a workaround than a solution. My imagination can only come up with file permission issues. If you are interested in finding the root cause, we could try again getting more log data to work on. You could add the |
It could be caused by different environment variables maybe. |
Also, can you please diff the log files from RLS/LSP4E when it works vs when it doesn't? |
I couldn't see much from the diff though. |
@ctron, these logs do not include any rust logs, did you add the |
@ctron You probably can do with running the following from a terminal session on your UI desktop, no restart required.
|
Well I did try that. Maybe you could try to reproduce my issue on a local machine. In that case you could do all the debugging directly. Here is what I did:
|
@ctron if you take the Rust package from https://ci.eclipse.org/packaging/job/simrel.epp-tycho-build/lastSuccessfulBuild/artifact/org.eclipse.epp.packages/archive/ (bypassing the installer), do you experiment the same issue? I'm trying to sort out whether this can be related to installer vs zip structure. |
I have similar problem: I see the same popup with message as @ctron RLS log:
|
@mickaelistria Sorry, I didn't yet find the time to test this. The initial download aborted, then I lost track of this. I will try to do this. |
I was finally able to try this. It shows the same behavior as with the other Eclipse installation. I was using |
I have noticed a strange behavior
RLS does not fail, builds everything successfully and starts indexing.
But then I close Eclipse, and run it through macos launchpad it fails again on "failed to compile dependent crate". My best guess is that there are some environment variable differences, or something that causes difference in behavior. |
It is a real possibility. I have encountered similar issues in the past and not just with Eclipse or Corrosion. Other things you may want to watch out for are $PWD and UID. However, now at least you have a workaround! What I often do on Linux is to create a small launcher script such as "eclipse_xx.yy_startup.sh" which sets up all the env vars for the session and then launches the actual IDE. I then add this script to whatever launcher/toolbar/start menu (not using macOS much these days though). |
@ngortheone And when you try with just |
Is this still an issue? |
Yes. |
I was having this same problem. The RLS didn't seem to be working, but it worked when I would start it from the terminal. However, after looking at this comment, I ran Try running |
However, later, the RLS turned off again. I'm not completely sure at what point. I had to run |
@ctron Does this still happen with the 2019-06 RC2 candidate? |
I just tested this with 2019-06 RC1 and it works now! Thanks!
Now I can see my code is full of issues 😁 |
I have the following rust code in the editor:
However, trying to run this from the IDE I do get:
Also see:
My expectations would be:
The text was updated successfully, but these errors were encountered: