abingham / emacs-ycmd

Emacs client for ycmd, the code completion system.
MIT License
383 stars 46 forks source link

deferred error : (void-function ycmd-semantic-completer-available-p) #452

Open GradySimon opened 7 years ago

GradySimon commented 7 years ago

Hey there,

I'm using emacs-ycmd in Spacemacs for C++.

When in a C++ file, every time I move the cursor, I see deferred error : (void-function ycmd-semantic-completer-available-p) printed to the mini-buffer. Completion seems to work (though this is the first time I've tried to use emacs-ycmd so I might not be aware of stuff that isn't working), but the constant mini-buffer spam is somewhat annoying.

Here are some dumps that might be useful. I'm in a corporate environment, so I'm eliding potentially sensitive details. Let me know if anything critical has been <snip>'d

When I debug the deferred error (using deferred:debug-on-signal), I see:

Debugger entered--Lisp error: (wrong-number-of-arguments (0 . 0) 1)
   #[0 "\300 \207" [ycmd-semantic-completer-available-p] 1](nil)
  deferred:call-lambda(#[0 "\300 \207" [ycmd-semantic-completer-available-p] 1] nil)
  deferred:exec-task([cl-struct-deferred #[0 "\300 \207" [ycmd-semantic-completer-available-p] 1] deferred:default-errorback deferred:default-cancel [cl-struct-deferred #[257 "\211\203\211\301=\203\302\303\"\210\304\305!\210\211\306=\207" [major-mode none message "No semantic completer exists for major-mode: %s'. Ycmd ELDoc mode disabled in current buffer." ycmd-eldoc-mode -1 t] 4 "\n\n(fn RESPONSE)"] deferred:default-errorback deferred:default-cancel [cl-struct-deferred #[257 "\211\205\300 \207" [ycmd-eldoc--info-at-point] 2 "\n\n(fn RESPONSE)"] deferred:default-errorback deferred:default-cancel [cl-struct-deferred #[257 "\300!\207" [eldoc-message] 3 "\n\n(fn TEXT)"] deferred:default-errorback deferred:default-cancel nil nil nil] nil nil] nil nil] nil nil] ok nil)
  deferred:worker()
  apply(deferred:worker nil)
  timer-event-handler([t 23040 59396 312653 nil deferred:worker nil nil 846000])

Here's ycmd-server:

/usr/lib/youcompleteme/ycm_extra_conf.py:274: SyntaxWarning: name '_ycm_temp_dir' is used prior to global declaration
  global _ycm_temp_dir
2017-11-06 14:53:04,293 - INFO - Calling global extra conf method YcmCorePreload on conf file /usr/lib/youcompleteme/ycm_extra_conf.py
serving on http://127.0.0.1:42031
2017-11-06 14:53:08,735 - INFO - Received event notification
2017-11-06 14:53:08,736 - DEBUG - Event name: BufferVisit
2017-11-06 14:53:08,737 - ERROR - No semantic completer exists for filetypes: [u'elisp']
Traceback (most recent call last):
  File "/usr/lib/youcompleteme/third_party/ycmd/ycmd/../ycmd/server_state.py", line 100, in FiletypeCompletionAvailable
    self.GetFiletypeCompleter( filetypes )
  File "/usr/lib/youcompleteme/third_party/ycmd/ycmd/../ycmd/server_state.py", line 89, in GetFiletypeCompleter
    current_filetypes ) )
ValueError: No semantic completer exists for filetypes: [u'elisp']
2017-11-06 14:53:08,746 - INFO - Received event notification
2017-11-06 14:53:08,746 - DEBUG - Event name: BufferVisit
2017-11-06 14:53:08,755 - INFO - Received event notification
2017-11-06 14:53:08,755 - DEBUG - Event name: BufferVisit
2017-11-06 14:53:08,818 - INFO - Received event notification
2017-11-06 14:53:08,818 - DEBUG - Event name: FileReadyToParse
2017-11-06 14:53:08,819 - INFO - Adding buffer identifiers for file: <snip>
2017-11-06 14:53:08,832 - INFO - Received event notification
2017-11-06 14:53:08,832 - DEBUG - Event name: FileReadyToParse
2017-11-06 14:53:08,832 - INFO - Adding buffer identifiers for file: <snip>
2017-11-06 14:53:08,837 - ERROR - No semantic completer exists for filetypes: [u'elisp']
Traceback (most recent call last):
  File "/usr/lib/youcompleteme/third_party/ycmd/ycmd/../ycmd/server_state.py", line 100, in FiletypeCompletionAvailable
    self.GetFiletypeCompleter( filetypes )
  File "/usr/lib/youcompleteme/third_party/ycmd/ycmd/../ycmd/server_state.py", line 89, in GetFiletypeCompleter
    current_filetypes ) )
ValueError: No semantic completer exists for filetypes: [u'elisp']
2017-11-06 14:53:08,839 - INFO - Received event notification
2017-11-06 14:53:08,840 - DEBUG - Event name: FileReadyToParse
2017-11-06 14:53:08,840 - INFO - Adding buffer identifiers for file: <snip>
Traceback (most recent call last):
  File "/usr/lib/youcompleteme/third_party/ycmd/third_party/bottle/bottle.py", line 862, in _handle
    return route.call(**args)
  File "/usr/lib/youcompleteme/third_party/ycmd/third_party/bottle/bottle.py", line 1732, in wrapper
    rv = callback(*a, **ka)
  File "/usr/lib/youcompleteme/third_party/ycmd/ycmd/../ycmd/watchdog_plugin.py", line 108, in wrapper
    return callback( *args, **kwargs )
  File "/usr/lib/youcompleteme/third_party/ycmd/ycmd/../ycmd/hmac_plugin.py", line 70, in wrapper
    body = callback( *args, **kwargs )
  File "/usr/lib/youcompleteme/third_party/ycmd/ycmd/../ycmd/handlers.py", line 70, in EventNotification
    event_handler )( request_data )
  File "/usr/lib/youcompleteme/third_party/ycmd/ycmd/../ycmd/completers/cpp/clang_completer.py", line 325, in OnFileReadyToParse
    raise ValueError( NO_COMPILE_FLAGS_MESSAGE )
ValueError: Still no compile flags, no completions yet.
2017-11-06 14:54:32,788 - INFO - Received event notification
2017-11-06 14:54:32,790 - DEBUG - Event name: BufferVisit
2017-11-06 14:54:32,790 - ERROR - No semantic completer exists for filetypes: [u'elisp']
Traceback (most recent call last):
  File "/usr/lib/youcompleteme/third_party/ycmd/ycmd/../ycmd/server_state.py", line 100, in FiletypeCompletionAvailable
    self.GetFiletypeCompleter( filetypes )
  File "/usr/lib/youcompleteme/third_party/ycmd/ycmd/../ycmd/server_state.py", line 89, in GetFiletypeCompleter
    current_filetypes ) )
ValueError: No semantic completer exists for filetypes: [u'elisp']
2017-11-06 14:54:32,873 - INFO - Received event notification
2017-11-06 14:54:32,875 - DEBUG - Event name: FileReadyToParse
2017-11-06 14:54:32,875 - INFO - Adding buffer identifiers for file: <snip>
2017-11-06 14:54:32,902 - ERROR - No semantic completer exists for filetypes: [u'elisp']
Traceback (most recent call last):
  File "/usr/lib/youcompleteme/third_party/ycmd/ycmd/../ycmd/server_state.py", line 100, in FiletypeCompletionAvailable
    self.GetFiletypeCompleter( filetypes )
  File "/usr/lib/youcompleteme/third_party/ycmd/ycmd/../ycmd/server_state.py", line 89, in GetFiletypeCompleter
    current_filetypes ) )
ValueError: No semantic completer exists for filetypes: [u'elisp']
2017-11-06 15:02:29,665 - INFO - Received debug info request
2017-11-06 15:03:03,886 - INFO - Received debug info request
2017-11-06 15:03:04,090 - INFO - Received health request
2017-11-06 15:03:05,119 - DEBUG - Keeping subservers alive

Here's ycmd-show-debug-info:

((completer (name . "C-family")
            (servers)
            (items ((key . "compilation database path")
                    (value . "None"))
                   ((key . "flags")
                    (value . "<snip>"))))
 (extra_conf (path . "/usr/lib/youcompleteme/ycm_extra_conf.py")
             (is_loaded . t))
 (clang (version . "<snip>")
        (has_support . t))
 (python (executable . "/usr/grte/v4/bin/python2.7") (version . "2.7.6")))

Server is running at: 127.0.0.1:42031

Ycmd Mode is enabled

--------------------

Ycmd version:   1.3snapshot (package: 20171027.1412)
Emacs version:  25.2.50.1
System:         x86_64-pc-linux-gnu
Window system:  x
ptrv commented 7 years ago

It looks like there some kind of mismatch of the ycmd.el file and ycmd-eldoc.el file. Maybe one of the byte compiled files are not up to date? Have you tried to reinstall emacs-ycmd?

Also how did you configure emacs-ycmd? You need to provide more input on that?

From the server log it looks like also you are trying to complete in an emacs lisp file, where semantic completion is not available.

Btw, I'm not an spacemacs user, so I have no experience with configuring spacemacs