-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Ensure Consistent Order of build_files in WriteAutoRegenerationRule #3062
base: main
Are you sure you want to change the base?
Conversation
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.
I added the first line to the comment message to link the pull request to the issue as discussed in There is a small performance decrease because of the "function all overhead" but I think it negligible if others agree. |
@cclauss Can you approve and merge? |
It would be great if this PR can be merged and released. Thanks for your work. |
@cclauss How can we proceed and merge those changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting changes because I think this change would be overwritten the next time gyp-next
is updated.
@cclauss Should this change be landed in that repo instead? https://github.com/nodejs/gyp-next/blob/db890891192c9b3d19dc2f576b81fafde280d1aa/pylib/gyp/generator/make.py#L2386
If I'm wrong here I will approve instead.
Thanks for your attention. I think it would be better to add this change into I found
|
Fixes #3061
This PR addresses an issue with the WriteAutoRegenerationRule function in node-gyp, where the build_files set was passed without sorting, leading to an inconsistent order of dependencies in the generated Makefile.
Changes:
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.
Impact:
This change stabilizes the output of the Makefile generation process, resolving the issue of inconsistent file order and reducing false positives in CI checks.
Checklist
npm install && npm run lint && npm test
passestests are includedNO, There are no tests for this code areadocumentation is changed or addedThere is not documantation for this code areaDescription of change