Hi WebKit developers,

Recently I started coding in WebKitGTK+ on Linux and I realized that source
files that are batch-compiled in UnifiedSources don't get an entry in
compile_commands.json, making it difficult to get flags for autocompletion,
"go-to definition" and conditional highlighting feature in IDEs.

Do you currently have a workaround for that?

In my local branch I wrote a script to "expand" compile_commands.json
entries of UnifiedSources into entries of the source files contained in
them.

For example, if JavascriptScore/UnifiedSource2.cpp has

#include "API/JSBase.cpp"
#include "API/JSCTestRunnerUtils.cpp"
#include "API/JSCallbackConstructor.cpp"

The script replaces the entry
of UnifiedSource2.cpp by three entries (one for each source file) with the
same flags but replacing the "file" field with the path to those source
files.

I included calling this script at the end of the build-webkit (under a
command line option) script. So far it has work for me, but I wonder if
this is the right approach or if you already solved that in another way.

Best regards,
Cadu Bentzen.
_______________________________________________
webkit-dev mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to