-
Notifications
You must be signed in to change notification settings - Fork 204
[Incremental] Skip post-compile jobs only if no compiles ran, and all the outputs are up-to-date. #580
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
Conversation
@swift-ci please test |
c4dd5b5
to
40bab34
Compare
@swift-ci please test |
Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationState.swift
Outdated
Show resolved
Hide resolved
Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationState.swift
Outdated
Show resolved
Hide resolved
Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationState.swift
Show resolved
Hide resolved
FYI, I plan to add a regression test before landing this PR. |
@cltnschlosser Thank you for such a quick review! I'll look at your concerns today. |
@swift-ci please test |
1 similar comment
@swift-ci please test |
Err, can we change the format of the build record? If the user needs to fall back/upgrade to or from the old and new drivers, will this break anything? |
Thanks for taking a look at this PR. I'm not sure I understand. The new build end time has a new section name, and the code should accept either the old name for the old time or the new name for the old time. At least, that's the code I thought I wrote. |
The question is more base than that: This new format appears to replace a key from the legacy driver’s build record format outright. So, if I use the new driver and need to downgrade then the old driver will be missing information. Is the legacy driver tolerant of that use case? Similarly if I upgrade, the new driver will not have these new keys to read. If we are unsure of the answer to this question, I would prefer we make only additive changes to the build record format. |
e5046d8
to
d942bc0
Compare
d942bc0
to
52ed8e4
Compare
Thanks for explaining. This sort of issue is exactly why I like to reviews! I just performed a few experiments: Tried an upgrade from a main swift-driver to this one, a downgrade from this one to the main, and also a downgrade from this one to the legacy driver. I tried these transitions in one of two scenarios, with "build_time" changed to "build_start_time" and with "build_time" left alone. Surprisingly, it turned out that there was no benefit to the latter scenario. Both the legacy driver and the main (status quo) swift driver reject the build record when there is a new field (in this case "build_end_time") added to it. I conclude that the better option is to go with the former scenario. We might as well rename the field since the added field will cause rejection anyway. To summarize the results: Upgrading from the main swift driver to this PR:
Downgrading from this PR to a main swift driver:
Downgrading from this PR or from main swift driver to legacy driver:
Thanks for asking the question. I don't see any better solution than this PR as it stands. Do you? |
@swift-ci please test |
Also, cleaned up the commit history |
[Incremental] Revise lit tests that were broken in swiftlang/swift-driver#580
If the merge-modules step fails or is cancelled, all the compile steps may be skipped, yet the post-compile jobs still must run.
Improve the logic that was skipping the post-compile jobs whenever there are no compile jobs.
When the compile jobs would otherwise be skipped, check their outputs against the time the previous build finished.
In order to perform the check, enhance the build record to store the end time as well as the start time of the prior build.
rdar://76127929