Skip to content

Core Gradle header dependencies is sensitive to the source ordering #864

@lacasseio

Description

@lacasseio

Because of this condition in DefaultIncrementalCompileSourceProcessor, the order in which Gradle process the source file will affect what headers are discovered. It boils down to the fact that if Gradle processes a file containing a macro include and discovers more defines for the macro - e.g. BOOST_PP_FILENAME_1 - the result will depend on whether or not the new definitions are found before or after the macro include was resolved. The condition tries to handle include cycles but disregards the case when the cycle has additional "visible macros". This particular case will be problematic if the source ordering is not stable.

We have seen the ordering issues with the source files, which we are still tracking down. For now, the simplest patch seems to simply order the source files before processing them.

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