[clang] [clang][deps] Stop sorting file dependencies (PR #114079)

Ben Langmuir via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 29 10:03:42 PDT 2024


================
@@ -472,7 +465,8 @@ class FullDeps {
             JOS.attributeArray("command-line",
                                toJSONStrings(JOS, MD.getBuildArguments()));
             JOS.attribute("context-hash", StringRef(MD.ID.ContextHash));
-            JOS.attributeArray("file-deps", toJSONSorted(JOS, MD.FileDeps));
+            // TODO: Shuffle these to prevent tests from depending on the order.
----------------
benlangmuir wrote:

It's not clear to me the value of being able to change the order (I don't think this would happen often) outweighs the benefits of better test coverage for deterministic output.

Regardless, I don't want to random shuffling the output of `clang-scan-deps`, because it breaks diffing the output.  To me this TODO just seems like a bad idea.

https://github.com/llvm/llvm-project/pull/114079


More information about the cfe-commits mailing list