Skip to content
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

YCM references rust_src_path instead of g:ycm_rust_src_path #2586

Closed
11 of 12 tasks
Emilgardis opened this issue Mar 25, 2017 · 8 comments
Closed
11 of 12 tasks

YCM references rust_src_path instead of g:ycm_rust_src_path #2586

Emilgardis opened this issue Mar 25, 2017 · 8 comments

Comments

@Emilgardis
Copy link

Emilgardis commented Mar 25, 2017

This issue has been changed to track how ycm mentions the incorrect variable

Issue Prelude

Please complete these steps and check these boxes (by putting an x inside
the brackets) before filing your issue:

  • I have read and understood YCM's CONTRIBUTING document.
  • I have read and understood YCM's CODE_OF_CONDUCT document.
  • I have read and understood YCM's README, especially the
    Frequently Asked Questions section.
  • I have searched YCM's issue tracker to find issues similar to the one I'm
    about to report and couldn't find an answer to my problem. (Example Google
    search.
    )
  • If filing a bug report, I have included the output of vim --version.
  • If filing a bug report, I have included the output of :YcmDebugInfo.
  • If filing a bug report, I have attached the contents of the logfiles using
    the :YcmToggleLogs command.
  • If filing a bug report, I have included which OS (including specific OS
    version) I am using.
  • If filing a bug report, I have included a minimal test case that reproduces
    my issue, including what I expected to happen and what actually happened.
  • If filing a installation failure report, I have included the entire output
    of install.py (or cmake/make/ninja) including its invocation
  • I understand this is an open-source project staffed by volunteers and
    that any help I receive is a selfless, heartfelt gift of their free time. I
    know I am not entitled to anything and will be polite and courteous.
  • I understand my issue may be closed if it becomes obvious I didn't
    actually perform all of these steps.

Thank you for adhering to this process! It ensures your issue is resolved
quickly and that neither your nor our time is needlessly wasted.

Issue Details

This issue is most likely related to #2579 and #2581

YCM reports RuntimeError: Rust sources path does not exist. Check the value of the rust_src_path option or the RUST_SRC_PATH environment variable. with :YcmShowDetailedDiagnostic and other commands. It also doesn't autocomplete ::std, external or local code.

The src path is set to
g:rust_src_path /home/localsys/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src which is reportedly working with a call to complete using a separate installation of racer. This racer installation is able to autocomplete both ::std and external code.

This problem started earlier today after previously working and I decided that upgrading YCM could make it fix itself, but no change has been seen.

Logfiles where obtained by opening a .rs file, and then doing :YcmShowDetailedDiagnostics

Diagnostic data

Output of vim --version

Vim +huge. (full build here )

Output of YcmDebugInfo

Printing YouCompleteMe debug information...
-- Client logfile: /tmp/ycm_k9ewt447.log
-- Server Python interpreter: /usr/bin/python
-- Server Python version: 3.6.0
-- Server has Clang support compiled in: False
-- Clang version: None
-- No extra configuration file found
-- Server running at: http://127.0.0.1:42301
-- Server process ID: 12570
-- Server logfiles:
--   /tmp/ycmd_42301_stdout_pmiv7krv.log
--   /tmp/ycmd_42301_stderr_2dcuta9g.log

Contents of YCM, ycmd and completion engine logfiles

YCM Logfiles

OS version, distribution, etc.

Arch linux

@micbou
Copy link
Collaborator

micbou commented Mar 25, 2017

The option is g:ycm_rust_src_path, not g:rust_src_path. Could you try again with the correct name?

@Emilgardis
Copy link
Author

setting g:ycm_rust_src_path /home/localsys/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src seems to have fixed the problem, I'm unsure why it worked previously.
I'll repurpose this issue to track the incorrect reference to g:rust_src_path instead of g:ycm_rust_src_path.

Why does ycm not use the latter?

@Emilgardis Emilgardis changed the title racerd not working, no completion due to "incorrect" correct rust_src_path YCM references g:rust_src_path instead of g:ycm_rust_src_path Mar 25, 2017
@micbou
Copy link
Collaborator

micbou commented Mar 25, 2017

All options from ycmd (the server to which YCM talks) are prefixed with ycm_ to avoid name clashes with other plugins. Since the error comes from the server, rust_src_path is mentioned, not g:ycm_rust_src_path (that's also why there is no g:).

@Emilgardis
Copy link
Author

I've submitted ycm-core/ycmd#729 to take care of this.

@wfxr
Copy link

wfxr commented May 6, 2017

It's strange. When I set with g:ycm_rust_src_path, YCM will not work for rust. And when remove the prefix ycm_, YCM work properly.

@bstaletic
Copy link
Collaborator

@wfxr My bet would be something else setting g:ycm_rust_src_path when you use g:rust_src_path. And it sets it up correctly. Check with :echo g:ycm_rust_src_path.

@wfxr
Copy link

wfxr commented May 6, 2017

@bstaletic :echo g:ycm_rust_src_path shows nothing but :echo g:rust_src_path shows right path I set.

@micbou micbou changed the title YCM references g:rust_src_path instead of g:ycm_rust_src_path YCM references rust_src_path instead of g:ycm_rust_src_path Oct 10, 2017
@bstaletic
Copy link
Collaborator

Like @micbou explained, the options are prefixed with g:ycm_ in YCM, but there is no prefix on the server. Closing as this is not really a bug.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants