Skip to content

No non-local Rust completion #3478

@sbmueller

Description

@sbmueller

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

Provide a clear description of the problem, including the following key
questions:

  • What did you do?

Installed YCM with --rust-completer. Opened a .rs file and started to code, for instance YouCompleteMe/third_party/ycmd/ycmd/tests/rust/testdata/common/src/main.rs.

  • What did you expect to happen?

When typing let a = Vec::n I expect to see a completion suggestion like new f pub const fn new() -> Vec<T>.

  • What actually happened?

Not all possible suggestions are shown.
image
Turns out only local completion works, for instance builder.bui:
image

"Global" completion, for instance from standard library does not work.

Diagnostic data

Output of vim --version

VIM - Vi IMproved 8.1 (2018 May 18, compiled Jun  5 2019 17:57:58)
macOS version
Included patches: 1-1368
Compiled by MacPorts
Huge version without GUI.  Features included (+) or not (-):
+acl               +cmdline_info      -farsi             +libcall           -mouse_sysmouse    +python3           +termguicolors     +vreplace
+arabic            +comments          +file_in_path      +linebreak         +mouse_urxvt       +quickfix          +terminal          +wildignore
+autocmd           +conceal           +find_in_path      +lispindent        +mouse_xterm       +reltime           +terminfo          +wildmenu
+autochdir         +cryptv            +float             +listcmds          +multi_byte        +rightleft         +termresponse      +windows
-autoservername    -cscope            +folding           +localmap          +multi_lang        -ruby              +textobjects       +writebackup
-balloon_eval      +cursorbind        -footer            -lua               -mzscheme          +scrollbind        +textprop          -X11
+balloon_eval_term +cursorshape       +fork()            +menu              +netbeans_intg     +signs             +timers            -xfontset
-browse            +dialog_con        +gettext           +mksession         +num64             +smartindent       +title             -xim
++builtin_terms    +diff              -hangul_input      +modify_fname      +packages          +startuptime       -toolbar           -xpm
+byte_offset       +digraphs          +iconv             +mouse             +path_extra        +statusline        +user_commands     -xsmp
+channel           -dnd               +insert_expand     -mouseshape        -perl              -sun_workshop      +vartabs           -xterm_clipboard
+cindent           -ebcdic            +job               +mouse_dec         +persistent_undo   +syntax            +vertsplit         -xterm_save
-clientserver      +emacs_tags        +jumplist          -mouse_gpm         +postscript        +tag_binary        +virtualedit
+clipboard         +eval              +keymap            -mouse_jsbterm     +printer           -tag_old_static    +visual
+cmdline_compl     +ex_extra          +lambda            +mouse_netterm     +profile           -tag_any_white     +visualextra
+cmdline_hist      +extra_search      +langmap           +mouse_sgr         -python            -tcl               +viminfo
   system vimrc file: "/opt/local/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/opt/local/share/vim"
Compilation: /usr/bin/clang -c -I. -Iproto -DHAVE_CONFIG_H   -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platf
orm/Developer/SDKs/MacOSX10.14.sdk -DMACOS_X -DMACOS_X_DARWIN  -pipe -Os -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Devel
oper/SDKs/MacOSX10.14.sdk -arch x86_64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: /usr/bin/clang   -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.plat
form/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -o vim        -lm  -lncurses -liconv -lintl -framework AppKit     -L/opt/local/Library/Frameworks/Python.fr
amework/Versions/3.7/lib/python3.7/config-3.7m-darwin -lpython3.7m -framework CoreFoundation

Output of YcmDebugInfo

Printing YouCompleteMe debug information...
-- Client logfile: /var/folders/zl/jgzhpvtx79jg0d_br665jj2r0000gn/T/ycm_kfeebm_4.log
-- Server Python interpreter: /opt/local/bin/python
-- Server Python version: 3.7.3
-- Server has Clang support compiled in: True
-- Clang version: clang version 8.0.0 (tags/RELEASE_800/final)
-- Extra configuration file found and loaded
-- Extra configuration path: /Users/senpo/.vim/plugged/YouCompleteMe/third_party/ycmd/.ycm_extra_conf.py
-- Rust completer debug information:
--   Rust Language Server running
--   Rust Language Server process ID: 13216
--   Rust Language Server executable: /Users/senpo/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/rls/bin/rls
--   Rust Language Server logfiles:
--     /var/folders/zl/jgzhpvtx79jg0d_br665jj2r0000gn/T/rust_language_server_stderrw8if9i6r.log
--   Rust Language Server Server State: Initialized
--   Rust Language Server Project Directory: /Users/senpo/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/tests/rust/testdata/common
--   Rust Language Server Settings: {}
--   Rust Language Server Project State: Indexing done, building done
--   Rust Language Server Version: 1.36.0 (9692ca8 2019-05-18)
-- Server running at: http://127.0.0.1:51750
-- Server process ID: 13211
-- Server logfiles:
--   /var/folders/zl/jgzhpvtx79jg0d_br665jj2r0000gn/T/ycmd_51750_stdout_6kaci2ov.log
--   /var/folders/zl/jgzhpvtx79jg0d_br665jj2r0000gn/T/ycmd_51750_stderr_03umrcb_.log

Contents of YCM, ycmd and completion engine logfiles

https://www.dropbox.com/s/239s6sn2h7g4veu/rust_language_stderr.log?dl=0
https://www.dropbox.com/s/yyjp8tyzwsucdq2/ycmd_stderr.log?dl=0

OS version, distribution, etc.

macOS 10.14.6

Output of build/install commands

https://www.dropbox.com/s/d7ov0o2cffjgvgq/installation.log?dl=0

I already hat a length discussion on Gitter with @bstaletic . He made sure I'm on the newest YCM commit and confirmed he gets the same installation output. Besides the OS difference (macOS - Linux) we seem to have identical setups, however completion works for him and not for me. Any help would be appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    UpstreamIssue is likely in upstream completion engine. Awaiting upstream patches.bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions