Skip to content

Inconsistent Order of build_files in WriteAutoRegenerationRule Causes CI Failures #3061

Open

Description

@ben-zalekta-lmnd

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)

Activity

  1. cclauss commented on Aug 19, 2024

    @cclauss
    Contributor
    -    " ".join(SourceifyAndQuoteSpaces(bf) for bf in build_files)
    +    " ".join(SourceifyAndQuoteSpaces(bf) for bf in sorted(build_files))
  2. ben-zalekta-lmnd commented on Aug 19, 2024

    @ben-zalekta-lmnd
    Author

    #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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions