Skip to content

PrebuiltModuleGen: consider failures of Foundation and anything below critical #604

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 2 commits into from
Apr 16, 2021

Conversation

nkcsgexi
Copy link
Contributor

Foundation failures can lead to noticeable slowness in compilation, so we should
consider them critical.

… critical

Foundation failures can lead to noticable slowness in compilation, so we should
consider them critical.
@@ -54,21 +53,25 @@ public class PrebuitModuleGenerationDelegate: JobExecutionDelegate {
}
}

static func getCriticalOutput(_ job: Job) -> VirtualPath? {
return job.moduleName == "Foundation" ? job.outputs[0].file : nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Before we also considered Swift and _Concurrency critical, do we no longer want to exit early on those?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This new condition implies the previous conditions as well. If Swift or _Concurrency failed, Foundation will surely fail too.

@@ -107,13 +107,13 @@ do {
executor: executor,
compilerExecutableDir: swiftcPath.parentDirectory)
let (jobs, danglingJobs) = try driver.generatePrebuitModuleGenerationJobs(with: inputMap, into: outputDir, exhaustive: !coreMode)
let delegate = PrebuitModuleGenerationDelegate(diagnosticsEngine, verbose)
let delegate = PrebuitModuleGenerationDelegate(jobs, diagnosticsEngine, verbose)
do {
try executor.execute(workload: DriverExecutorWorkload.init(jobs, nil, continueBuildingAfterErrors: true),
delegate: delegate, numParallelJobs: 128)
} catch {
// Only fail the process if stdlib failed
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment seems stale now, see comment above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will update!

@nkcsgexi
Copy link
Contributor Author

@swift-ci please test

@nkcsgexi nkcsgexi merged commit ff18f35 into swiftlang:main Apr 16, 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.

2 participants