Bear
Bear copied to clipboard
Incremental update of output compile_commands.json
First of all, thanks for the tool!
I am wondering if it would be possible to have a commandline parameter that makes bear update the output compile_commands.json incrementally during the build instead of in one fell swoop at the end. I am using rtags and it listens to file updates to start indexing files. It would be nice to start the indexing process in parallel with the build itself, instead of waiting for the entire thing to complete.
Thoughts?
Thank you.
thanks Alexander for the report. it's not impossible, but very different how the current implementation works... i presume rtags
would expect the compile_command.json
file is always be a valid JSON file. or how rtags
does it consume the compilation database? if Bear would update the compilation database for each file, wouldn't rtag
start to re-index the whole again and again? is it smart enough to recognize that the content changed by only a single file addition? can you test it, like touch compile_commands.json
every second and see that it does the re-indexing or not?
This would also be useful for better handling of Ctrl-C. Currently all output is lost if the build process is interrupted. Make it as an option?
dealing with ctrl-c might be a separate issue. you are right it is desirable. any update on rtags
indexing behavior?
rtags
monitors file-system events, and checks for changes in the compile_commands.json
file. As a test I manually removed and added a single entry from the json with vim, saving the file after each operation. I saw rdm
(the indexing server) reindex the corresponding c++ file when I added it back. It seems to be smart enough to diff.
Hi, first of all, thanks for this tool guys!!
I've just release a tool (based onYCM-generator/Bear), which basically process build log outputs and generate the corresponding compilation database file. The idea is to be faster (doesn't need a clean build or even an actual build) and more "cross-compilation friendly". I've used it successfully to index some large AOSP modules in ~1 minute and used its output with tools like YouCompleteMe, Deoplete and Rtags.
Feel free to try it out, open issues/feature requests and send PRs :)
https://github.com/nickdiego/compiledb-generator
Thanks, Nick
Kindly asking for any progress~
@tristone13th no progress unfortunately.