sourcegraph / scip-clang

Apache License 2.0
50 stars 7 forks source link

Add helper flag(s) for debugging large compilation databases #38

Open varungandhi-src opened 1 year ago

varungandhi-src commented 1 year ago

One of the common things needed during debugging initial setup around paths, headers etc. is to subset out the compile_commands.json file using jq. jq '.[0:N]' compile_commands.json > other.json and then run against other.json. This speeds up the iteration cycle. Maybe we should have a flag to make this simpler, instead of having to fiddle with jq.

Tentative flag name is --command-limit, open to other suggestions.

varungandhi-src commented 1 year ago

Now I'm wondering if we should instead record bad files separately, maybe a simple file format, and then ingest that. That would also solve this problem in a more general way.

varungandhi-src commented 1 year ago

Hmm, there are two different things here:

  1. The --command-limit flag would allow one to easily iteratively check for simple errors. E.g. some messed up paths.
  2. The record/replay options would allow one to look at multiple problems at once.

So they'd actually be serving two different purposes.