bazel-compile-commands-extractor icon indicating copy to clipboard operation
bazel-compile-commands-extractor copied to clipboard

Make compile_commands.json order deterministic

Open eklitzke opened this issue 4 months ago • 0 comments

Order entries in the output json file by filename, to make output deterministic.

An example of why this is useful: changes in Python, bazel, or rules_cc can all change the exact output order in compile_commands.json. When my compile commands change as a result of an upstream change in bazel or rules_cc, I would like to see what has changed. By making output order deterministic it makes it much simpler to diff the old and new compiler commands json files.

eklitzke avatar Jun 19 '25 06:06 eklitzke