Skip to content

How to make ycmd use the clang compilation database #26

@abingham

Description

@abingham

I'm having trouble getting ycmd to use my clang compilation database. I figure I must need to configure it somehow, but I don't know what needs to be done.

When I send a completion request I get this:

Traceback (most recent call last):
  File "/Users/sixtynorth/projects/ycmd/third_party/bottle/bottle.py", line 861, in _handle
    return route.call(**args)
  File "/Users/sixtynorth/projects/ycmd/third_party/bottle/bottle.py", line 1734, in wrapper
    rv = callback(*a, **ka)
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/watchdog_plugin.py", line 100, in wrapper
    return callback( *args, **kwargs )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/hmac_plugin.py", line 54, in wrapper
    body = callback( *args, **kwargs )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/handlers.py", line 100, in GetCompletions
    completer.ComputeCandidates( request_data ),
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/completers/completer.py", line 170, in ComputeCandidates
    candidates = self._GetCandidatesFromSubclass( request_data )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/completers/completer.py", line 185, in _GetCandidatesFromSubclass
    raw_completions = self.ComputeCandidatesInner( request_data )
  File "/Users/sixtynorth/projects/ycmd/ycmd/../ycmd/completers/cpp/clang_completer.py", line 85, in ComputeCandidatesInner
    raise RuntimeError( NO_COMPILE_FLAGS_MESSAGE )
RuntimeError: Still no compile flags, no completions yet.

I've verified that the compilation database exists and works. Tools like 'clang-check' work on the same file, so it should all be in place.
So, do I need to do anything to explicitly ask ycmd to use the compilation database? Or am I perhaps doing something else incorrectly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions