Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent Order of build_files in WriteAutoRegenerationRule Causes CI Failures #3061

Open
ben-zalekta-lmnd opened this issue Aug 19, 2024 · 2 comments · May be fixed by #3062
Open

Inconsistent Order of build_files in WriteAutoRegenerationRule Causes CI Failures #3061

ben-zalekta-lmnd opened this issue Aug 19, 2024 · 2 comments · May be fixed by #3062

Comments

@ben-zalekta-lmnd
Copy link

Hey 👋
When running node-gyp, the Makefile generation process produces different outputs on subsequent runs due to the unordered nature of the build_files set in the WriteAutoRegenerationRule function. This inconsistency occurs because sets in Python do not maintain order, leading to varying order of dependencies in the generated Makefile.

This issue causes problems in CI pipelines that compare file hashes, as the differing order results in false positives for changes. To ensure a stable and consistent build process, the order of build_files should be explicitly sorted before being used in the Makefile generation.

" ".join(SourceifyAndQuoteSpaces(bf) for bf in build_files)

@cclauss
Copy link
Contributor

cclauss commented Aug 19, 2024

-    " ".join(SourceifyAndQuoteSpaces(bf) for bf in build_files)
+    " ".join(SourceifyAndQuoteSpaces(bf) for bf in sorted(build_files))

@ben-zalekta-lmnd
Copy link
Author

ben-zalekta-lmnd commented Aug 19, 2024

#3062
@cclauss Can you check this one?

I am not sure why. But it seems like I can't link the pr to the issue.

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 a pull request may close this issue.

2 participants