-
Notifications
You must be signed in to change notification settings - Fork 256
RLS always fails textDocument/definition
, ctrl-hover and ctrl-click no longer working
#1106
Comments
Checking if this was the cause: 2aa398b |
In fact
|
Is this the equivalent of "Go to definition" in vsCode? Seems completely broken on recent nightlies. |
Yes, and yes. Pretty much. |
Might be fixed by rust-lang/rust#55521. |
Seems fixed in nightly-x86_64-unknown-linux-gnu rustc 1.32.0-nightly (8b096314a 2018-11-02) EDIT: my first test failed but after a kick of the IDE it does seem fine. |
Unfortunately due to #1107 I cannot upgrade my Nightly. |
Spoke too soon, last toolchains still having broken |
@Xanewok, do you need to release the fix?
|
I am seeing this problem intermittently (problem does not seem to be 100%) - |
with beta now working, with nightly partialy.
sighup - all just fine.
signup: in the beta all works. |
@norru relevant fixes were on librustc_save_analysis, which resides inside the Rust repo. The fixes were made regarding how the underlying index data is collected but this shouldn't affect RLS front. I tried testing RLS with Rust master with rust-lang/rust#55936 applied and it seems to be fixed now, but today's nightlies don't contain the fix yet, hopefully the new ones will. Could you try using the next nightly version to see if the problem still persists? |
@Xanewok yes, I'm waiting for the next drop of In fact, now that I found a workaround I can safely update |
Uh, I think we still might need a new version of However, I think this still might not work in the general case, while setting |
How do you set |
Can no longer repro after 2011-11-18. |
"textDocument/defintion" - still not working with nightly
beta chain works just fine
before the test always did cargo clean |
Can no longer reproduce as of 2018-11-23 |
No, in nightly rls return nothing. Like i wrote above. Why are you closed? Request/response Output from rls with nightly toolchain:
Request/response Output from rls with beta toolchain:
|
Temporary solution is enable "goto_def_racer_fallback" which is false by default. Racer fallback is enabled by default for hover/highlight. Internal resolve definition not works. |
There is no way to set "goto_def_racer_fallback" option to True in Corrosion. @alexheretic why is the default setting to fallback to Racer on for This bug happens randomly to me - couldn't figure out what triggers it. To me, restarting RLS temporarily fixes it for a little while. |
Having developed neither, my analysis would be that they were developed at different times in an evolving project. definition used to be a race between racer & rustc-analysis to minimise latency, later I suppose it was decided the latter solved the problem well enough to disable the former. Generally rls was moving away from relying on racer at all but it has no completion alternative. The current hover implementation came later, I guess the dev took the view that rustc-analysis mostly works but we may as well try racer after a failure. I think I agree that we should lazy fallback in both situations or neither. Enable lazy fallbacks
Remove fallbacks
|
Unfortunately this no longer seems to be the case, if it ever was - or perhaps the functionality has regressed badly since then?
I don't think the "main" implementation is robust enough that we can afford removing the fallbacks without severely affecting overall user experience and functionality. Now, if the "main" option (compiler-based analysis) were just a bit more robust, that would be a completely different kettle of fish. |
Just found this: https://github.com/jwilm/racerd |
I imagine we can bring old back behaviour and lazily fallback to Racer - previously both implementations raced and Racer was a best-guess, so we disabled it. However, the As per |
@Xanewok With the current state of affairs, lazily falling back to Racer by default for both Once the dust has settled on the symbol definition you may want to revisit again. If the "main" solution is good, the failover should be triggered once in a blue moon. Have you thought of adding telemetry to RLS (for users to opt-in)? RLS could gather information locally in the form of counters and timers and then call home on demand, or every day, or even every hour so you can actively monitor which functionality is actually used on the field. Once you have monitoring in place it's very easy to track any sort of regression (performance, stability, functionality) in the wild with very little effort on the users' side. |
Apart from the fallback in the PR, the proposed goto-def fix is at rust-dev-tools/rls-analysis#159. Re telemetry, I think it'd be hard to get any meaningful data - the latency can wildly differ depending on the project, definition, we'd have to identify those for it to be more useful but then the users might feel weird when a project can continuously analyze their code (some of it it's closed source - I know it's opt-in, but sometimes you can forget yadda yadda) so I'm not sold on that. We could analyze time to complete a request, its kind and success rate but that'll require supporting telemetry infrastructure for unclear benefits. |
I understand it requires substantial effort and you have bigger fish to fry. However, if you ever get to implement it, bear in mind that benefits will be also substantial (I have used some form of telemetry in large projects and I now don't ever understand how people can do without!). Setting up the infrastructure is costly, but once it's there it's easy to iteratively improve it to get incrementally better monitoring and significant metrics. Metrics will be in the form of counters and timers so there will be no possibility of code leaking. The telemetry doesn't have to be enabled by default - an env var such as |
We are getting closer to have custom startup settings for RLS in Corrosion: eclipse-corrosion/corrosion#182 |
With rust-lang/rust#56406 this should be fixed on today’s nightlies (beta also has the fix backported). Could you please see if the newest rls has the problem fixed? |
Just got nightly, and nothing works. All i get is the following
|
Bug above fixed, we have also enabled Racer fallback in Corrosion. It looks good my side! |
Sounds great, thank you! Feel free to reopen if the issue still persists. |
rls-preview 0.130.5 (1c755ef 2018-10-20) rustc nightly-2018-10-28
Ctrl-click and ctrl-hover no longer work, at all. "result" is always []
UPDATE:
The text was updated successfully, but these errors were encountered: