danielbarter / mini_compile_commands

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does it make sense to include NIX_CFLAGS_COMPILE in the output?

expipiplus1 opened this issue · comments

Since clangd is itself savvy to this variable, putting these in the output results in them being present twice in the eventual compilation inside clangd. (Any other LSP tools should also be aware of these on nix).

Having duplicate commands in the output doesn't matter for use with clangd. We are very careful to capture everything, and I am afraid that trying to exclude certain arguments would result in things slipping through the cracks.

It would be possible to remove duplicates before writing to json

Closing, since IMO for the intended use case this is a non issue.