Skip to content

[Explicit Module Builds][Incremental Builds] Re-compile module dependencies whose dependencies are up-to-date themselves but are themselves newer #1628

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

Merged
merged 3 commits into from
Jun 11, 2024

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Jun 6, 2024

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.

Resolves rdar://129225956

@artemcm artemcm changed the title [Explicit Module Builds][Incremental Builds] Re-compile module dependnecies whose dependencies are up-to-date themselves but are themselves newer [Explicit Module Builds][Incremental Builds] Re-compile module dependencies whose dependencies are up-to-date themselves but are themselves newer Jun 6, 2024
@artemcm artemcm force-pushed the ReCompileDepsWithNewerUpToDateDeps branch 3 times, most recently from 262a20b to 28f6b63 Compare June 6, 2024 22:51
@artemcm artemcm force-pushed the ReCompileDepsWithNewerUpToDateDeps branch from 28f6b63 to bc16bd6 Compare June 7, 2024 16:30
…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
@artemcm artemcm force-pushed the ReCompileDepsWithNewerUpToDateDeps branch from bc16bd6 to adce133 Compare June 7, 2024 16:31
@artemcm artemcm force-pushed the ReCompileDepsWithNewerUpToDateDeps branch from c1f3040 to 3bbdc0e Compare June 7, 2024 18:17
@artemcm artemcm marked this pull request as ready for review June 7, 2024 18:17
@artemcm
Copy link
Contributor Author

artemcm commented Jun 7, 2024

@swift-ci test

…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 force-pushed the ReCompileDepsWithNewerUpToDateDeps branch from 3bbdc0e to 3be4396 Compare June 7, 2024 19:11
@artemcm
Copy link
Contributor Author

artemcm commented Jun 7, 2024

@swift-ci test

@artemcm
Copy link
Contributor Author

artemcm commented Jun 7, 2024

@swift-ci test Windows platform

@artemcm artemcm merged commit ebfddde into swiftlang:main Jun 11, 2024
3 checks passed
@artemcm artemcm deleted the ReCompileDepsWithNewerUpToDateDeps branch June 11, 2024 17:23
artemcm added a commit to artemcm/swift-driver that referenced this pull request Jul 30, 2024
…module dependencies as up-to-date

Instead of conservatively assuming them to be new/updated in order to invalidate their dependents. This behavior is no longer necessary since the implementation of swiftlang#1628 (adce133) which will ensure that if a binary module dependnecy is newer than any of its dependents they will get invalidated and re-built.
artemcm added a commit to artemcm/swift-driver that referenced this pull request Jul 30, 2024
…module dependencies as up-to-date

Instead of conservatively assuming them to be new/updated in order to invalidate their dependents. This behavior is no longer necessary since the implementation of swiftlang#1628 (adce133) which will ensure that if a binary module dependnecy is newer than any of its dependents they will get invalidated and re-built.
artemcm added a commit to artemcm/swift-driver that referenced this pull request Jul 30, 2024
…module dependencies as up-to-date

Instead of conservatively assuming them to be new/updated in order to invalidate their dependents. This behavior is no longer necessary since the implementation of swiftlang#1628 (adce133) which will ensure that if a binary module dependnecy is newer than any of its dependents they will get invalidated and re-built.
artemcm added a commit to artemcm/swift-driver that referenced this pull request Jul 31, 2024
…module dependencies as up-to-date

Instead of conservatively assuming them to be new/updated in order to invalidate their dependents. This behavior is no longer necessary since the implementation of swiftlang#1628 (adce133) which will ensure that if a binary module dependnecy is newer than any of its dependents they will get invalidated and re-built.
artemcm added a commit that referenced this pull request Jul 31, 2024
…module dependencies as up-to-date

Instead of conservatively assuming them to be new/updated in order to invalidate their dependents. This behavior is no longer necessary since the implementation of #1628 (adce133) which will ensure that if a binary module dependnecy is newer than any of its dependents they will get invalidated and re-built.
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