Skip to content

Incremental: ensure we add post-compile jobs if no new compile jobs are found #509

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 1 commit into from
Feb 23, 2021

Conversation

nkcsgexi
Copy link
Contributor

rdar://74447605

@nkcsgexi
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@artemcm artemcm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @davidungar what do you think?

@nkcsgexi
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@davidungar davidungar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for looking at this issue

I suspect that, with this fix, the post-compile jobs would get to run before the compile-pch job finished.

I'm starting to wonder if a better fix is to remove the early return from addRuleBeyondMandatoryCompiles and instead to put an early return in collectJobsDiscoveredToBeNeededAfterFinishing , returning empty if a non-compile job?

@davidungar
Copy link
Contributor

Hate to say it, but I'm now waffling.
Here's what I'm thinking... in a non-incremental build, maybe there would be nothing to sequence the jobs other than llbuild input-output matching. (Is that right?) So, could all the pre-compile jobs just get run in parallel with the post-compile jobs modulo inputs and outputs? If so, your fix is better: unfinishedJobs -> unfinishedCompileJobs.

@nkcsgexi
Copy link
Contributor Author

Ok, let's merge this for now. @davidungar any advice for adding test for this change?

@davidungar
Copy link
Contributor

Ok, let's merge this for now. @davidungar any advice for adding test for this change?

Good question, @nkcsgexi . I guess we need a test that creates a precompiled header. I would look at testIncremental to see what that does. Much of that machinery should be reusable.

@davidungar
Copy link
Contributor

One last thought: with this change are we guaranteed that the whole driver process won't terminate before the pch job?

@artemcm
Copy link
Contributor

artemcm commented Feb 23, 2021

One last thought: with this change are we guaranteed that the whole driver process won't terminate before the pch job?

I think this job is always going to be a part of the initial set of jobs we submit to llbuild, (not one discovered when other jobs finish), so the ExecuteAllJobsRule should ensure it actually gets run before we return from MultiJobExecutor::execute.

@davidungar
Copy link
Contributor

One last thought: with this change are we guaranteed that the whole driver process won't terminate before the pch job?

I think this job is always going to be a part of the initial set of jobs we submit to llbuild, (not one discovered when other jobs finish), so the ExecuteAllJobsRule should ensure it actually gets run before we return from MultiJobExecutor::execute.

Thanks! Sounds good to me.

@nkcsgexi nkcsgexi merged commit 07a07b8 into swiftlang:main Feb 23, 2021
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.

3 participants