Skip to content

Conversation

eklitzke
Copy link

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant