ycm-core / ycmd

A code-completion & code-comprehension server
https://ycm-core.github.io/ycmd/
GNU General Public License v3.0
1.69k stars 764 forks source link

C# completer does not load on Linux without mono, despite it not being needed with .NET 6.0 #1750

Open dkaszews opened 1 month ago

dkaszews commented 1 month ago

Issue Prelude

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

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:

Try using YCM in .NET 6.0 project on Linux without mono installed.

Per log:

No mono executable at None

failure is caused by cs_completer.py:72 requiring mono on Linux, despite cs_completer.py:441,443 only requiring mono if roslyn_path ends with .exe.

Include steps to reproduce here.

  1. Install YCM with --cs-completer
  2. Follow .NET 6.0 instructions in README
  3. Create C# file with var x = "";
  4. Run :YcmCompleter GetType with cursor on x

Include description of a minimal test case, including any actual code required to reproduce the issue.

If you made changes to vimrc_ycm_minimal, pase them here:

Include description of the expected behaviour.

System.String is shown

Include description of the observed behaviour, including actual output, screenshots, etc.

ValueError: No semantic completer exists for filetypes: ['cs']

Diagnostic data

Output of vim --version

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1692716794

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/__w/neovim/neovim/build/nvim.AppDir/usr/share/nvim"

Run :checkhealth for more info

Output of YcmDebugInfo

Printing YouCompleteMe debug information...
-- Resolve completions: Never
-- Client logfile: /tmp/ycm_8_vtjvb_.log
-- Server Python interpreter: /usr/bin/python3
-- Server Python version: 3.10.12
-- Server has Clang support compiled in: False
-- Clang version: None
-- No extra configuration file found
-- Server running at: http://127.0.0.1:58993
-- Server process ID: 4034667
-- Server logfiles:
--   /tmp/ycmd_58993_stdout_8g29j64y.log
--   /tmp/ycmd_58993_stderr_oyi0l59g.log
-- Semantic highlighting supported: False
-- Virtual text supported: False
-- Popup windows supported: False

Output of YcmDiags

Native filetype completion not supported for current file, cannot force recompilation.  

Output of git rev-parse HEAD in YouCompleteMe installation directory

52618aeebf12ca4c8e31c45551d903160e201038

Contents of YCM, ycmd and completion engine logfiles

Reproduce the issue with vim -Nu /path/to/YCM/vimrc_ycm_minimal, which enabled debug logging and other useful diagnostics. Include a link to a gist containing all of the log files listed by :YcmToggleLogs.

ycm_8vtjvb.log ycmd_58993_stderr_oyi0l59g.log

OS version, distribution, etc.

Include system information here.

OS: Ubuntu 22.04.4 LTS x86_64 
Host: VirtualBox 1.2 
Kernel: 6.5.0-44-generic 
Uptime: 22 hours, 31 mins 
Packages: 1740 (dpkg), 11 (snap) 
Shell: bash 5.1.16 
Terminal: /dev/pts/0 
CPU: 12th Gen Intel i5-1245U (8) @ 2.495GHz 
Memory: 2675MiB / 7931MiB 

Output of build/install commands

Include link to a gist containing the invocation and entire output of install.py if reporting an installation issue.