My file is attached below. Please rename to compile_commands.json to test.
I am getting python errors when i try to run below. I tried in Windows and WSL ubuntu.
'compdb -p . list > compile_commands.json'
Traceback (most recent call last):
File "/home/jthomas1/.local/bin/compdb", line 8, in
sys.exit(main())
File "/home/jthomas1/.local/lib/python3.10/site-packages/compdb/cli.py", line 291, in main
command.execute(config, args.args)
File "/home/jthomas1/.local/lib/python3.10/site-packages/compdb/cli.py", line 89, in execute
included_by_database = builder.build(database)
File "/home/jthomas1/.local/lib/python3.10/site-packages/compdb/includedb.py", line 271, in build
for compile_command in database.get_all_compile_commands():
File "/home/jthomas1/.local/lib/python3.10/site-packages/compdb/core.py", line 50, in
return itertools.chain.from_iterable((db.get_all_compile_commands()
File "/home/jthomas1/.local/lib/python3.10/site-packages/compdb/backend/json.py", line 39, in get_all_compile_commands
return map(self._dict_to_compile_command, self._data)
File "/home/jthomas1/.local/lib/python3.10/site-packages/compdb/backend/json.py", line 56, in _data
self.data = json.load(f)
File "/usr/lib/python3.10/json/init.py", line 293, in load
return loads(fp.read(),
File "/usr/lib/python3.10/json/init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
My file is attached below. Please rename to compile_commands.json to test.
I am getting python errors when i try to run below. I tried in Windows and WSL ubuntu.
'compdb -p . list > compile_commands.json'
Traceback (most recent call last): File "/home/jthomas1/.local/bin/compdb", line 8, in
sys.exit(main())
File "/home/jthomas1/.local/lib/python3.10/site-packages/compdb/cli.py", line 291, in main
command.execute(config, args.args)
File "/home/jthomas1/.local/lib/python3.10/site-packages/compdb/cli.py", line 89, in execute
included_by_database = builder.build(database)
File "/home/jthomas1/.local/lib/python3.10/site-packages/compdb/includedb.py", line 271, in build
for compile_command in database.get_all_compile_commands():
File "/home/jthomas1/.local/lib/python3.10/site-packages/compdb/core.py", line 50, in
return itertools.chain.from_iterable((db.get_all_compile_commands()
File "/home/jthomas1/.local/lib/python3.10/site-packages/compdb/backend/json.py", line 39, in get_all_compile_commands
return map(self._dict_to_compile_command, self._data)
File "/home/jthomas1/.local/lib/python3.10/site-packages/compdb/backend/json.py", line 56, in _data
self.data = json.load(f)
File "/usr/lib/python3.10/json/init.py", line 293, in load
return loads(fp.read(),
File "/usr/lib/python3.10/json/init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
compile_commands - Copy.json