Skip to content

Swift: Turn off caching and integrated driver in autobuild - #22111

Merged
jketema merged 4 commits into
github:mainfrom
jketema:jketema/swift-more-autobuild
Jul 20, 2026
Merged

Swift: Turn off caching and integrated driver in autobuild#22111
jketema merged 4 commits into
github:mainfrom
jketema:jketema/swift-more-autobuild

Conversation

@jketema

@jketemajketema commented Jul 2, 2026

Copy link
Copy Markdown
Contributor
  • Caching causes compiler invocations to be omitted. You can try this for yourself by turning on caching while building the project from the xcode-hello integration test, then cleaning of the build artifacts and building the project again while caching is enabled. This yields a database that is practically empty.
  • The integrated driver causes compiler invocations to depend on modules shipped with Xcode. Those are unfortunately incompatible with our extractor.

For clarity: Earlier Xcode versions seem to silently ignore the additional options, so there is no direct need to determine what the Xcode version is.

The QA experiment that links here is a bit messy due to QA timing out. See the link in the very last comment I posted for something that approximates a complete experiment.

@jketema
jketema marked this pull request as ready for review July 2, 2026 15:09
@jketema
jketema requested a review from a team as a code ownerJuly 2, 2026 15:09
CopilotAI review requested due to automatic review settings July 2, 2026 15:09
@jketemajketema changed the title Swift: Turn of caching and integrated driver in autobuildSwift: Turn off caching and integrated driver in autobuildJul 2, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Swift autobuilder’s xcodebuild invocation to avoid Swift compilation caching and the integrated driver, which can otherwise lead to missing compiler invocations (nearly empty databases) or dependence on Xcode-shipped modules that the extractor can’t handle.

Changes:

  • Add Xcode build settings to disable compilation caching and the integrated driver in swift-autobuilder.
  • Update swift-autobuilder test golden files to match the new xcodebuild command-line.
  • Adjust Swift Xcode integration tests to pass SWIFT_USE_INTEGRATED_DRIVER=NO, and simplify one autobuilder integration test’s markers/expectations.
Show a summary per file
FileDescription
swift/swift-autobuilder/tests/hello-workspace/commands.expectedUpdates expected xcodebuild command to include cache + integrated-driver disabling settings.
swift/swift-autobuilder/tests/hello-tests/commands.expectedUpdates expected xcodebuild command to include cache + integrated-driver disabling settings.
swift/swift-autobuilder/tests/hello-targets-with-tests-suffix/commands.expectedUpdates expected xcodebuild command to include cache + integrated-driver disabling settings.
swift/swift-autobuilder/tests/hello-autobuilder/commands.expectedUpdates expected xcodebuild command to include cache + integrated-driver disabling settings.
swift/swift-autobuilder/BuildRunner.cppAdds xcodebuild build settings to disable compilation caching and the integrated driver for Xcode target builds.
swift/ql/integration-tests/osx/hello-xcode/test.pyAdds SWIFT_USE_INTEGRATED_DRIVER=NO to the integration test’s explicit xcodebuild command.
swift/ql/integration-tests/osx/hello-ios/test.pyAdds SWIFT_USE_INTEGRATED_DRIVER=NO to the integration test’s explicit xcodebuild command.
swift/ql/integration-tests/autobuilder/xcode-fails-spm-works/test.pySimplifies ql-test markers, making DB-CHECK unconditionally xfailed.
swift/ql/integration-tests/autobuilder/xcode-fails-spm-works/Files.macos_26.expectedRemoves macOS-26-specific expected output variant.
swift/ql/integration-tests/autobuilder/failure/diagnostics.expectedUpdates diagnostic expected output to include the new xcodebuild settings in the reported command.

Review details

  • Files reviewed: 10/10 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment on lines +12 to +13
"CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO "
"SWIFT_USE_INTEGRATED_DRIVER=NO",

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Technically, yes, but this project was not set up with caching enabled.

Comment on lines +10 to +11
"CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO "
"SWIFT_USE_INTEGRATED_DRIVER=NO",

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Technically, yes, but this project was not set up with caching enabled.

jketema added 4 commits July 8, 2026 09:35
* Caching cases compiler invocations to be omitted. You can try this for
yourself by turning on caching while building the project from the
`xcode-hello` integration test, then cleaning of the build artifacts
and building the project again while caching is enabled. This yields
a database that is practically empty.
* The integrated driver causes compiler invocations to depend on modules
shipped with Xcode. Those are unfortunately incompatible with our
extractor.
@jketema
jketemaforce-pushed the jketema/swift-more-autobuild branch from 4ecaf49 to 36af59aCompareJuly 8, 2026 07:36

@geoffw0geoffw0 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM (some details discussed in another channel).

@jketema
jketema merged commit 5690ec7 into github:mainJul 20, 2026
20 checks passed
@jketema
jketema deleted the jketema/swift-more-autobuild branch July 20, 2026 11:54
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jketema@geoffw0