complie_commands.json generated by node-gyp doesn't be in clangd search path.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.7k
- Forks
- 1.9k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 5
Description
https://clangd.llvm.org/installation.html#project-setup
clangd will look in the parent directories of the files you edit looking for it, and also in subdirectories named build/. For example, if editing $SRC/gui/window.cpp, we search in $SRC/gui/, $SRC/gui/build/, $SRC/, $SRC/build/, …
$ node-gyp configure -- -f compile_commands_json
will generate build/Release/compile_commands_json and build/Debug/compile_commands_json. both of them don't be searched by clangd. Can we provide a build/compile_commands_json which content is just same as build/Release/compile_commands_json or build/Debug/compile_commands_json to make clangd can find it? It should be easy.
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the node-gyp configure flow and the generated build/Release/compile_commands_json and build/Debug/compile_commands_json paths described in the issue; compare them with clangd’s documented project lookup behavior. Done means the compile database is available at the parent build location clangd searches, with behavior verified for the configure command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, python
- Domain
- build-system, developer-experience
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100