nodejs / nodejs/node-gyp

generate compile_commands.json automatically

Open
#3,017 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.7k
Forks
1.9k
Avg merge
1d 4h
Merged PRs (30d)
5

Description

I notice other build system allow generate compile_commands.json automatically.

For example:

meson

meson setup build

will generate build/compile_commands_json.

cmake

export CMAKE_EXPORT_COMPILE_COMMANDS=1
cmake -Bbuild

will generate build/compile_commands_json.

Can node-gyp do same thing? that is

node-gyp configure

or

export GYP_EXPORT_COMPILE_COMMANDS=1
node-gyp configure

will generate build/compile_commands_json.

TIA!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the node-gyp configure entry point and the GYP build-file generation path, then compare how Meson and CMake expose compile_commands.json generation. Done means a configure run produces build/compile_commands.json, optionally controlled by the proposed environment variable; no specific test file is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.