.gitignore: ignore compile_commands.json globally
Subsystems (2)
Andrii Nakryiko
maintainerPATCH v2 1/1 .gitignore: ignore compile_commands.json globally
compile_commands.json can be used with clangd to enable language server protocol-based assistance. For kernel itself this can be built with scripts/gen_compile_commands.py, but other projects (e.g., libbpf, or BPF selftests) can benefit from their own compilation database file, which can be generated successfully using external tools, like bear [0].
So, instead of adding compile_commands.json to .gitignore in respective individual projects, let's just ignore it globally anywhere in Linux repo.
While at it, remove exactly such a local .gitignore rule under tools/power/cpupower.
[0] https://github.com/rizsotto/Bear
---v1->v2:
- clean up tools/power/cpupower's .gitignore (Miguel Ojeda).
.gitignore | 2 +- tools/power/cpupower/.gitignore | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-)
.gitignore +1 -1
@@ -175,7 +175,7 @@ x509.genkey *.kdev4 # Clang's compilation database file -/compile_commands.json +compile_commands.json # Documentation toolchain sphinx_*/
tools/power/cpupower/.gitignore +0 -3
@@ -27,6 +27,3 @@ debug/i386/intel_gsic debug/i386/powernow-k8-decode debug/x86_64/centrino-decode debug/x86_64/powernow-k8-decode - -# Clang's compilation database file -compile_commands.json
Signature · 1 line
2.47.1
Quoted 10 lines · Andrii Nakryiko
compile_commands.json can be used with clangd to enable language server protocol-based assistance. For kernel itself this can be built with
scripts/gen_compile_commands.py, but other projects (e.g., libbpf, or BPF selftests) can benefit from their own compilation database file, which can be generated successfully using external tools, like bear [0].So, instead of adding compile_commands.json to .gitignore in respective individual projects, let's just ignore it globally anywhere in Linux repo.
Quoted 8 lines
While at it, remove exactly such a local .gitignore rule under
tools/power/cpupower.[0] https://github.com/rizsotto/Bear
Reviewed-by Nathan Chancellor <[email protected]>Suggested-by Eduard Zingerman <[email protected]>Signed-off-by Andrii Nakryiko <[email protected]>
Thanks!
Cheers,
Miguel
Quoted 15 lines · Miguel Ojeda
Quoted 13 lines · Andrii Nakryiko
compile_commands.json can be used with clangd to enable language server protocol-based assistance. For kernel itself this can be built with
scripts/gen_compile_commands.py, but other projects (e.g., libbpf, or BPF selftests) can benefit from their own compilation database file, which can be generated successfully using external tools, like bear [0].So, instead of adding compile_commands.json to .gitignore in respective individual projects, let's just ignore it globally anywhere in Linux repo.
While at it, remove exactly such a local .gitignore rule under
tools/power/cpupower.
Quoted 8 lines
Quoted 5 lines
[0] https://github.com/rizsotto/Bear
Reviewed-by Nathan Chancellor <[email protected]>Suggested-by Eduard Zingerman <[email protected]>Signed-off-by Andrii Nakryiko <[email protected]>Reviewed-by Miguel Ojeda <[email protected]>
Masahiro,
Would you be able to pick this up? Or where should we route this through, in your opinion? Thanks!
Quoted 4 lines
Thanks!
Cheers,
Miguel
Quoted 24 lines · Andrii Nakryiko
Quoted 21 lines · Miguel Ojeda
Quoted 18 lines · Andrii Nakryiko
compile_commands.json can be used with clangd to enable language server protocol-based assistance. For kernel itself this can be built with
scripts/gen_compile_commands.py, but other projects (e.g., libbpf, or BPF selftests) can benefit from their own compilation database file, which can be generated successfully using external tools, like bear [0].So, instead of adding compile_commands.json to .gitignore in respective individual projects, let's just ignore it globally anywhere in Linux repo.
While at it, remove exactly such a local .gitignore rule under
tools/power/cpupower.[0] https://github.com/rizsotto/Bear
Reviewed-by Nathan Chancellor <[email protected]>Suggested-by Eduard Zingerman <[email protected]>Signed-off-by Andrii Nakryiko <[email protected]>
Quoted 8 lines
Quoted 2 lines
Reviewed-by Miguel Ojeda <[email protected]>Masahiro,
Would you be able to pick this up? Or where should we route this through, in your opinion? Thanks!
Seems like this has fallen through the cracks... I guess we can take it through the bpf-next tree, if there is no better home for this?
Quoted 4 lines
Quoted 4 lines
Thanks!
Cheers,
Miguel
Nathan Chancellor
Acked-byHi Andrii,
Quoted 2 lines · Andrii Nakryiko
Seems like this has fallen through the cracks... I guess we can take it through the bpf-next tree, if there is no better home for this?
Masahiro recently turned over maintenance of the Kbuild build tree as of commit 8d6841d5cb20 ("MAINTAINERS: hand over Kbuild maintenance"). I am happy to pick this up in the new Kbuild tree but I have no objections to you taking it via BPF with
if you would like to. I suspect it matters most to the BPF folks anyways.
Cheers,
Nathan
Quoted 7 lines · Nathan Chancellor
Hi Andrii,
Quoted 2 lines · Andrii Nakryiko
Seems like this has fallen through the cracks... I guess we can take it through the bpf-next tree, if there is no better home for this?
Quoted 8 lines
Masahiro recently turned over maintenance of the
Kbuildbuild tree as of commit8d6841d5cb20("MAINTAINERS: hand overKbuildmaintenance"). I am happy to pick this up in the newKbuildtree but I have no objections to you taking it via BPF withif you would like to. I suspect it matters most to the BPF folks anyways.
I think the Kbuild tree makes most sense, as there is nothing BPF specific here. I'm just carrying my custom compile_commands.json for libbpf project and being careful about not accidentally committing it (so far I managed), so I only want this to *eventually* make its way into the kernel repo. Not urgent, though.
Please take it through the Kbuild tree then, thanks!
Quoted 3 lines
Cheers,
Nathan
Nathan Chancellor
AppliedQuoted 10 lines · Andrii Nakryiko
compile_commands.json can be used with clangd to enable language server protocol-based assistance. For kernel itself this can be built with
scripts/gen_compile_commands.py, but other projects (e.g., libbpf, or BPF selftests) can benefit from their own compilation database file, which can be generated successfully using external tools, like bear [0].So, instead of adding compile_commands.json to .gitignore in respective individual projects, let's just ignore it globally anywhere in Linux repo.
[...]
Applied, thanks!
[1/1] .gitignore: ignore compile_commands.json globally
https://git.kernel.org/kbuild/c/f7cc3caea0005
Best regards,
Signature · 1 line
Nathan Chancellor <[email protected]>