Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Fallback to racer definition #1152

Merged
merged 2 commits into from
Jan 8, 2019

Conversation

alexheretic
Copy link
Member

@alexheretic alexheretic commented Nov 29, 2018

I've been having a look at handling lsp in out-of-project rust files, like dependencies, for ide-rust which got me more interested in this. From the discussions in #1139 & #1106 I think we got fairly close to consensus.

  • Runs racer find_definition if analysis goto has failed and racer_completion config is enabled. This brings the functionality in line with hover (now in both cases racer calls are lazy).
  • Removed goto_def_racer_fallback config.
  • Minor: Ignore clippy large enum lint in BuildPlan.

I think reusing racer_completion config is desirable, as the only known reason to disable this is when racer has critical performance issues with a project. In these cases we'd also not want any racer-fallbacks to run. In other cases where analysis works these fallbacks have no cost, so again I don't see an advantage in having a separate config.

Resolves #1106
Resolves #1139

Copy link
Member

@Xanewok Xanewok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, left a single comment. Also summon @nrc due to enabling Racer fallback

src/actions/requests.rs Outdated Show resolved Hide resolved
@norru
Copy link

norru commented Dec 1, 2018

@norru
Copy link

norru commented Dec 5, 2018

Stuck?

@Xanewok
Copy link
Member

Xanewok commented Dec 6, 2018

This looks good now, thanks @alexheretic! It's not stuck - I'd just like to hear @nrc's thoughts on enabling the fallback by default, since I remember we did this for reasons (potentially misleading or costly at that time? Can't remember 😢 )

@alexheretic alexheretic force-pushed the fail-back-to-racer-def branch 3 times, most recently from 8122237 to 3e36a0a Compare December 10, 2018 12:23
@Xanewok Xanewok mentioned this pull request Dec 10, 2018
* Runs racer find_definition if analysis goto has failed
  and `racer_completion` config is enabled. This brings
  the functionality in line with hover.
* Removed `goto_def_racer_fallback`.
* Ignore clippy large enum lint in `BuildPlan`
@alexheretic alexheretic force-pushed the fail-back-to-racer-def branch from 3e36a0a to 2d16f79 Compare December 13, 2018 16:57
@nrc nrc merged commit e1aafa7 into rust-lang:master Jan 8, 2019
@nrc
Copy link
Member

nrc commented Jan 8, 2019

Thanks! And sorry for the delay!

@alexheretic alexheretic deleted the fail-back-to-racer-def branch January 8, 2019 11:22
dvic added a commit to dvic/rls-vscode that referenced this pull request Feb 23, 2019
What I understand, it has been replaced by the existing `racer_completion` config attribute: rust-lang/rls#1152

Fixes rust-lang#510
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants