News for hackers. Stuff that matters.
Re:Cquery: highly-scalable, low-latency language server for C++ by sient on Friday November 17, 2017 @10:17AM (#15722587)
Author here! Wasn't quite ready to post to HN yet since cquery is still in development, and I plan to eventually publish on the vscode marketplace so using cquery should be as simple as using the existing C/C++ extension.

Let me know if you have any questions.

Re:Cquery: highly-scalable, low-latency language server for C++ by archgoon on Friday November 17, 2017 @04:34PM (#15726150)
Hi! I see you're using compile_commands.json. How are you handling header files? I've found that header files present problems for compile_commands since a number of tools using compiler_commands (like bear) only look at the compiler commands for .c files, and don't notice that the header files should be added as well.

I know that some tools, like YCM, attempt to intelligently map a header file to it's associated .cpp/.cc/.c file to guess what the compiler commands are, but this doesn't always work.

What is the state of generating compiler_commands.json for Chromium? I remember running into this issue a few years back.

Re:Cquery: highly-scalable, low-latency language server for C++ by sient on Saturday November 18, 2017 @12:28AM (#15727886)
> Hi! I see you're using compile_commands.json. How are you handling header files? I've found that header files present problems for compile_commands since a number of tools using compiler_commands (like bear) only look at the compiler commands for .c files, and don't notice that the header files should be added as well.

When a cc file is indexed cquery will index the associated header files. There is some logic to deduplicate multiple header file parsing so it only happens once, but that is fundamentally how it works. cquery then knows which header files are associated to which cc files.

> I know that some tools, like YCM, attempt to intelligently map a header file to it's associated .cpp/.cc/.c file to guess what the compiler commands are, but this doesn't always work.

cquery does this as well, because you can, for example, create a new file that is not in compile_commands.json. cquery has sophisticated logic here, as it will also try to infer if the file is test or platform specific (use general postfix matching) as those often have a very different set of arguments.

> What is the state of generating compiler_commands.json for Chromium? I remember running into this issue a few years back.

Chrome compiles using ninja, which natively supports compile_commands.json, so generating the file works well and is easy to do. I have not run into any issue here.

Re:Cquery: highly-scalable, low-latency language server for C++ by izym on Friday November 17, 2017 @01:25PM (#15724563)
Does this support Objective-C++? If not, do you have any plans to implement support for it?
Re:Cquery: highly-scalable, low-latency language server for C++ by sient on Friday November 17, 2017 @02:10PM (#15725036)
I have not tested it, but it should be a relatively straightforward to get working. Feel free to file an issue on github.
Re:Cquery: highly-scalable, low-latency language server for C++ by systems on Friday November 17, 2017 @11:57AM (#15723680)
Any plans for Cmake support?
Re:Cquery: highly-scalable, low-latency language server for C++ by sient on Friday November 17, 2017 @12:03PM (#15723736)
In what sense? cmake can generate compile_commands.json so projects built using cmake are supported.