Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently the ordering of the files in the dependency manifest file are undefined as the directories are stored in an unordered list.
This has resulted in a bug specifically for me with the combination of
CMake
/ninja
/depfiles
as if the first file listed as an output by CMake is not the first file in the list for the dependency manifest file, ninja complains about a missing "primary output" and treats the entire list of dependencies as dirty and rebuilds them.The outputs for protoc don't really have a "primary" output as outputs of python/cpp etc would all be equal.
This PR sorts the dependency output files before writing them to resolve this.
At least this way so long as both of the CMake list and depfile are sorted it will work as expected.