-
Notifications
You must be signed in to change notification settings - Fork 27
Closed
Description
When using a tool such as bear (https://github.com/rizsotto/Bear) to build the compilation database for a Makefile based project, the generated compilation database uses the 'arguments' key instead of the 'command' key.
To reproduce:
git clone https://github.com/mbcrawfo/GenericMakefile.git
cd GenericMakefile/cpp
bear make
compdb -p . list
Result:
[
]
Traceback (most recent call last):
File "/home/rich/bin/compdb", line 9, in <module>
load_entry_point('compdb==0.1.1', 'console_scripts', 'compdb')()
File "/home/rich/.local/lib/python2.7/site-packages/compdb-0.1.1-py2.7.egg/compdb/cli.py", line 559, in main
command.execute()
File "/home/rich/.local/lib/python2.7/site-packages/compdb-0.1.1-py2.7.egg/compdb/cli.py", line 239, in execute
for compile_command in compile_commands:
File "/home/rich/.local/lib/python2.7/site-packages/compdb-0.1.1-py2.7.egg/compdb/core.py", line 50, in <genexpr>
for db in databases))
File "/home/rich/.local/lib/python2.7/site-packages/compdb-0.1.1-py2.7.egg/compdb/db/json.py", line 38, in get_all_compile_commands
return map(self._dict_to_compile_command, self._data)
File "/home/rich/.local/lib/python2.7/site-packages/compdb-0.1.1-py2.7.egg/compdb/db/json.py", line 43, in _dict_to_compile_command
shlex.split(d['command']))
KeyError: u'command'
Things that use libclang, such as YCM seem fine with both cmake and bear derived compilation databases, so it would be great if compdb supported both.
This was using compdb 0.1.1
Metadata
Metadata
Assignees
Labels
No labels