ccls
ccls copied to clipboard
ccls re-index files when compiler starts with '/bin'
Observed behavior
test.cpp
#include <exception>
compile_commands.json
[{
"directory": "/tmp/test_ccls",
"command": "/bin/g++ -c /tmp/test_ccls/test.cpp",
"file": "/tmp/test_ccls/test.cpp"
}]
Run ccls twice
$ ccls --index=. -v=1 |& grep timestamp
$ ccls --index=. -v=1 |& grep timestamp
11:40:30 indexer15 pipeline.cc:286 V(1) timestamp changed for /tmp/test_ccls/test.cpp via /include/c++/9/exception
Note that the include path is wrong -- /include/c++/9/exception actually doesn't exists, so the mtime here is none, leading to the re-indexing.
If I change the '/bin/g++' to '/usr/bin/g++', the include patch will be correct, and ccls works fine.
Expected behavior
There should be no re-indexing in the 2nd run.
System information
- ccls version: 0.20210330-10-gb28cec18
- clang version: g2fcdd685bd02
- OS: Ubuntu 20.04.2 LTS