macOS: `xtool dev` fails with "No valid Swift SDK bundles found" on Xcode 16.2 / Swift 6.0 (no version check)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 63/100
調査の方向性
Sources/PackLib/BuildSettings.swift のコメントと Installation-macOS.md の macOS インストール手順を読み、SwiftPM SDK の要件を確認してください。Swift 6.0 で issue の swift build --swift-sdk arm64-apple-ios コマンドを実行して再現し、次に xtool dev がビルド失敗をどのように処理するか確認してください。macOS ユーザーに最小バージョンを明確に示すエラーが表示されるか、文書に記載された最小バージョンが明示されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
On macOS, xtool dev builds with swift build --swift-sdk arm64-apple-ios and relies on SwiftPM's implicit Darwin SDKs, which (per the comment in Sources/PackLib/BuildSettings.swift) exist as of Swift 6.1. With Xcode 16.2 (Swift 6.0.3) the build fails with an error that doesn't point at the cause, and xtool sdk install skips on macOS, so there's no obvious way forward. There's no Swift/Xcode version check, and Installation-macOS.md only shows Swift 6.1 in example output rather than stating it as a minimum.
This bites anyone on macOS 15.3 or earlier, since Xcode 16.3 needs macOS 15.4.
Environment
- xtool 1.23.0 (Homebrew)
- macOS 15.3.1, Apple Silicon (M4)
- Xcode 16.2, Apple Swift 6.0.3 (swiftlang-6.0.3.1.10)
Steps
xtool setup(works fine).- In an xtool project:
xtool dev run --usb.- First run, with no
~/Library/org.swift.swiftpm/swift-sdksdirectory yet:
error: The folder "swift-sdks" doesn't exist. - Once that directory exists (e.g. after running
swift sdk list):
error: No valid Swift SDK bundles found at ~/Library/org.swift.swiftpm/swift-sdks.
- First run, with no
xtool sdk install /path/to/Xcode.appprintsSkipping SDK install; the iOS SDK ships with Xcode on macOS, so it doesn't help.
Minimal repro without xtool
mkdir -p repro/Sources/Repro && cd repro
cat > Package.swift <<'EOF'
// swift-tools-version: 6.0
import PackageDescription
let package = Package(name: "Repro", platforms: [.iOS(.v17)], targets: [.target(name: "Repro")])
EOF
echo 'public let x = 1' > Sources/Repro/Repro.swift
env -u SDKROOT "$(xcrun -f swift)" build --swift-sdk arm64-apple-ios
# error: No valid Swift SDK bundles found at ~/Library/org.swift.swiftpm/swift-sdks.
So the failure is SwiftPM 6.0's behaviour; xtool just doesn't catch it. I couldn't confirm the Swift 6.1 side on this machine (Xcode 16.3 won't install on macOS 15.3.1), so that part rests on the code comment.
Suggestion
Either or both of:
- On macOS, check the toolchain's Swift version (or that
--swift-sdk arm64-apple-iosresolves) before building, and fail with something like:xtool on macOS needs Swift 6.1+ (Xcode 16.3+); found Swift 6.0.3. - State the minimum Xcode/Swift version in
Installation-macOS.md.
Workaround, for anyone stuck on Xcode 16.2
This got an app onto a device:
xtool dev generate-xcode-project
xcodebuild -workspace xtool/<App>.xcworkspace -scheme <App>-App \
-sdk iphoneos -destination 'generic/platform=iOS' -derivedDataPath ./dd \
CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO build
xtool install --usb dd/Build/Products/Debug-iphoneos/<App>-App.app
xtool install signs and installs the unsigned .app fine. One thing not to try: xtool sdk build + swift sdk install of the result. That bundle is built for a Linux host and fails on macOS with a cyclic dependency in module 'DarwinFoundation' error.
- 主要言語
- Swift
- スター
- 5.5k
- フォーク
- 163
- 平均マージ
- 19時間 33分
- マージ済み PR(30日)
- 25
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
xtool-org/xtool のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
-
Error: exited(127)オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
xtool-org/xtool#365 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
xtool-org/xtool#364 · リアクション 6 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
xtool-org/xtool#359 · コメント 3 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
xtool-org/xtool の issue をすべて見る
似ている issue
-
product / auth product / databases product / functions product / messaging product / storage product / vcs
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
storage: eliminate force-unwraps and fatalError in continueStreamingUpload対応中かも @chingor13 が今日担当しました。 オープンapi: storage type: cleanup
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
googleapis/google-cloud-swift#1527 ·
メンテナーはふだん 1 日以内に返信
-
ci-failure ci:assertion test
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
openwatersio/slackwater-ios#811 ·
メンテナーはふだん 1 日以内に返信
-
ai-assisted
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
swiftlang/swift-testing#1979 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
foxglove/mcap#1907 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信