From 85166ffc79158fb259154c948ddd65437c2cbb0a Mon Sep 17 00:00:00 2001 From: ben-zalekta-lmnd Date: Mon, 19 Aug 2024 17:40:58 +0300 Subject: [PATCH] fix: Ensure Consistent Order of build_files in WriteAutoRegenerationRule Wrapped the build_files set in the sorted() function before it is processed in WriteAutoRegenerationRule. This ensures that the order of files is consistent across all runs, preventing issues in CI environments that rely on file hash comparisons. --- gyp/pylib/gyp/generator/make.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gyp/pylib/gyp/generator/make.py b/gyp/pylib/gyp/generator/make.py index 392d900914..e89b705d53 100644 --- a/gyp/pylib/gyp/generator/make.py +++ b/gyp/pylib/gyp/generator/make.py @@ -2383,7 +2383,7 @@ def WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files) % { "makefile_name": makefile_name, "deps": replace_sep( - " ".join(SourceifyAndQuoteSpaces(bf) for bf in build_files) + " ".join(SourceifyAndQuoteSpaces(bf) for bf in sorted(build_files)) ), "cmd": replace_sep(gyp.common.EncodePOSIXShellList( [gyp_binary, "-fmake"] + gyp.RegenerateFlags(options) + build_files_args