Skip to content

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Jun 11, 2024

Cherry-pick of #1628

Explanation: For example consider the following module graph:

graph LR;
    test-->J;
    J-->G;
Loading

Where on an incremental build we detect that although G binary module product is newer than its textual source, said binary module product is also newer than a prior binary module product of J. Which means that although each of the modules is up-to-date with respect to its own textual source inputs, J's module dependency's binary input has been updated elsewhere and J needs to be re-built.

Risk: Low. This change adds to incremental explicitly-built module re-build filtering logic to also check timestamps of module dependency outputs of a given module dependency. This was not handled before and could lead to unsound incremental builds. The risk is relatively low because this is still off on the default code-path.

Testing: Automated tests added to the compiler and driver suite.
Reviewed By: @owenv

Resolves rdar://129225956

artemcm added 3 commits June 11, 2024 10:26
…necies whose dependencies are up-to-date themselves but are themselves newer

For example consider the following module graph:
             test
                 \
                  J
                   \
                    G

Where on an incremental build we detect that although G binary module product is *newer* than its textual source, said binary module product is also *newer* than a prior binary module product of J. Which means that although each of the modules is up-to-date with respect to its own textual source inputs, J's binary dependnecy input has been updated elsewhere and J needs to be re-built.

Resolves rdar://129225956
…k if a prior inter-module dep graph is up-to-date with a check to decide which modules to re-build

Using the same 'computeInvalidatedModuleDependencies' routine, which is more thorough and checks module inputs to each dependency as well.
@artemcm artemcm requested a review from nkcsgexi June 11, 2024 17:30
@artemcm
Copy link
Contributor Author

artemcm commented Jun 11, 2024

@swift-ci test

@artemcm
Copy link
Contributor Author

artemcm commented Jun 11, 2024

@swift-ci test macOS platform

…licitly-built module tests to avoid conflicts on parallel test runs
@artemcm
Copy link
Contributor Author

artemcm commented Jun 12, 2024

@swift-ci test

@artemcm
Copy link
Contributor Author

artemcm commented Jun 12, 2024

@swift-ci test Windows platform

@artemcm artemcm merged commit e1057dc into swiftlang:release/6.0 Jun 12, 2024
@artemcm artemcm deleted the 60ReCompileDepsWithNewerUpToDateDeps branch June 12, 2024 23:28
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 this pull request may close these issues.

2 participants