Skip to content

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

Open
jketema wants to merge 4 commits into
github:mainfrom
jketema:jketema/swift-more-autobuild
Open

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

Conversation

@jketema

@jketema jketema commented Jul 2, 2026

Copy link
Copy Markdown
Contributor
  • 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.

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.

jketema added 2 commits July 2, 2026 14:31
* 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.
@github-actions github-actions Bot added the Swift label Jul 2, 2026
@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 owner July 2, 2026 15:09
Copilot AI review requested due to automatic review settings July 2, 2026 15:09
@jketema jketema changed the title Swift: Turn of caching and integrated driver in autobuild Swift: Turn off caching and integrated driver in autobuild Jul 2, 2026

Copilot AI 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
File Description
swift/swift-autobuilder/tests/hello-workspace/commands.expected Updates expected xcodebuild command to include cache + integrated-driver disabling settings.
swift/swift-autobuilder/tests/hello-tests/commands.expected Updates expected xcodebuild command to include cache + integrated-driver disabling settings.
swift/swift-autobuilder/tests/hello-targets-with-tests-suffix/commands.expected Updates expected xcodebuild command to include cache + integrated-driver disabling settings.
swift/swift-autobuilder/tests/hello-autobuilder/commands.expected Updates expected xcodebuild command to include cache + integrated-driver disabling settings.
swift/swift-autobuilder/BuildRunner.cpp Adds xcodebuild build settings to disable compilation caching and the integrated driver for Xcode target builds.
swift/ql/integration-tests/osx/hello-xcode/test.py Adds SWIFT_USE_INTEGRATED_DRIVER=NO to the integration test’s explicit xcodebuild command.
swift/ql/integration-tests/osx/hello-ios/test.py Adds SWIFT_USE_INTEGRATED_DRIVER=NO to the integration test’s explicit xcodebuild command.
swift/ql/integration-tests/autobuilder/xcode-fails-spm-works/test.py Simplifies ql-test markers, making DB-CHECK unconditionally xfailed.
swift/ql/integration-tests/autobuilder/xcode-fails-spm-works/Files.macos_26.expected Removes macOS-26-specific expected output variant.
swift/ql/integration-tests/autobuilder/failure/diagnostics.expected Updates 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
Contributor Author

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
Contributor Author

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.

Sign up for free to 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.

2 participants