Uh oh!
There was an error while loading. Please reload this page.
Swift: Turn off caching and integrated driver in autobuild - #22111
Conversation
There was a problem hiding this comment.
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-autobuildertest golden files to match the newxcodebuildcommand-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
| "CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO " | ||
| "SWIFT_USE_INTEGRATED_DRIVER=NO", |
There was a problem hiding this comment.
Technically, yes, but this project was not set up with caching enabled.
| "CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO " | ||
| "SWIFT_USE_INTEGRATED_DRIVER=NO", |
There was a problem hiding this comment.
Technically, yes, but this project was not set up with caching enabled.
* 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.
4ecaf49 to
36af59aCompare
geoffw0
left a comment
There was a problem hiding this comment.
LGTM (some details discussed in another channel).
Uh oh!
There was an error while loading. Please reload this page.
xcode-hellointegration test, then cleaning of the build artifacts and building the project again while caching is enabled. This yields a database that is practically empty.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.