From 86c2ca337fbbb8aaa60ee73f68f651ba4cab91b1 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Sun, 22 Nov 2026 20:08:13 +0000 Subject: [PATCH] swift: commit the TailcatKit scheme xcodebuild builds with The swift macOS CI job has been failing about 40% of runs since it landed, always in the "compile Swift for iOS" step: xcodebuild: error: The workspace named "swift" does not contain a scheme named "TailcatKit". Right before the error xcodebuild logs IDERunContextManager warnings, "could not delete old scheme: Cannot modify data because the process disallows saving". xcodebuild auto-generates schemes for Swift packages on demand, and that generation is what flakes. Running xcodebuild -list first (7b82bc2c4) didn't help: the -list output shows the scheme, and the build invocation seconds later still fails to find it. Commit the TailcatKit scheme to .swiftpm/xcode/xcshareddata/xcschemes so xcodebuild reads it from disk instead of generating one, and carve that file out of the .swiftpm ignore. Verified with the exact CI commands on macOS 26 with Xcode 26.4: the device and simulator builds both pass with the committed scheme. Signed-off-by: Brad Fitzpatrick --- swift/.gitignore | 14 +++++++++-- .../xcschemes/TailcatKit.xcscheme | 25 +++++++++++++++++++ swift/README.md | 7 ++++++ 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 swift/.swiftpm/xcode/xcshareddata/xcschemes/TailcatKit.xcscheme diff --git a/swift/.gitignore b/swift/.gitignore index f9643664b..318de98f4 100644 --- a/swift/.gitignore +++ b/swift/.gitignore @@ -1,6 +1,16 @@ # Built by `make xcframework` in this directory. /CTailcat.xcframework -# SwiftPM, xcodebuild (-derivedDataPath build) and Xcode state. +# SwiftPM, xcodebuild (-derivedDataPath build) and Xcode state, except the +# shared scheme below. xcodebuild's auto-generated SwiftPM schemes are +# flaky on CI runners, so the TailcatKit scheme that CI builds with is +# committed instead of generated. /.build /build -/.swiftpm +/.swiftpm/* +!/.swiftpm/xcode/ +/.swiftpm/xcode/* +!/.swiftpm/xcode/xcshareddata/ +/.swiftpm/xcode/xcshareddata/* +!/.swiftpm/xcode/xcshareddata/xcschemes/ +/.swiftpm/xcode/xcshareddata/xcschemes/* +!/.swiftpm/xcode/xcshareddata/xcschemes/TailcatKit.xcscheme diff --git a/swift/.swiftpm/xcode/xcshareddata/xcschemes/TailcatKit.xcscheme b/swift/.swiftpm/xcode/xcshareddata/xcschemes/TailcatKit.xcscheme new file mode 100644 index 000000000..ea0c6b983 --- /dev/null +++ b/swift/.swiftpm/xcode/xcshareddata/xcschemes/TailcatKit.xcscheme @@ -0,0 +1,25 @@ + + + + + + + + + + + diff --git a/swift/README.md b/swift/README.md index d890a615b..8138cdd4c 100644 --- a/swift/README.md +++ b/swift/README.md @@ -172,3 +172,10 @@ From this directory: xcodebuild -scheme TailcatKit -destination 'generic/platform=iOS' -derivedDataPath build/device build CODE_SIGNING_ALLOWED=NO xcodebuild -scheme TailcatKit -destination 'generic/platform=iOS Simulator' -derivedDataPath build/simulator build CODE_SIGNING_ALLOWED=NO ``` + +The `TailcatKit` scheme these commands and CI build with is committed at +`.swiftpm/xcode/xcshareddata/xcschemes/TailcatKit.xcscheme`. xcodebuild +auto-generates schemes for Swift packages on demand, but that generation fails +intermittently on CI runners ("The workspace ... does not contain a scheme named +TailcatKit"), so the scheme is committed instead. The rest of `.swiftpm` remains +ignored.