Generated Gradle task clears DEVELOPER_DIR, so the stable-Xcode workaround from #714 doesn't reach the Android Swift build
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
調査の方向性
Start in build.gradle.kts at the generated buildAndroidSwiftPackageDebug and Release tasks, then reproduce with DEVELOPER_DIR pointing to the matching Xcode and run skip export --debug --no-ios. Check that the task no longer prevents the caller's Xcode selection from reaching skip android build, and verify that the native app produces the APK and AAB.
索引モデルが issue の本文から書いたものです。
説明
Summary
The Gradle task that Skip generates for native (Fuse) modules, buildAndroidSwiftPackageDebug / Release in build.gradle.kts, sets environment("DEVELOPER_DIR", "") before it runs skip android build. This clears the workaround recommended in #714 (point DEVELOPER_DIR at a stable Xcode). When the machine's global Xcode (xcode-select) differs from the Xcode that matches the Swift Android SDK, skip export fails in Assemble Android app.
Environment
- Skip 1.9.11 (plugin and CLI), skip-lib 1.4.3
- Global Xcode (
xcode-select): Xcode 27.0 (Swift 6.4) DEVELOPER_DIR=/Applications/Xcode-26.6.0.app/Contents/Developer, Swift 6.3.3 toolchain,swift-6.3.3-RELEASE_androidSDK- macOS 27, Apple Silicon
Steps
- Keep Xcode 27 as the global Xcode and install Xcode 26.6 next to it.
export DEVELOPER_DIR=/Applications/Xcode-26.6.0.app/Contents/Developer- In a native app that depends on a package whose manifest isn't cached yet (for us,
swift-crypto):skip export --debug --no-ios
Result
The manifest is compiled by the 6.3.3 swiftc, but against the Xcode 27 SDK (-sdk /Applications/Xcode.app/.../MacOSX27.0.sdk), and it crashes:
error: Invalid manifest (compiled with: [".../swift-6.3.3-RELEASE.xctoolchain/usr/bin/swiftc", ... "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk", ... ".../Packages/swift-crypto/Package.swift"])
error: compile command failed due to signal 11
<unknown>:0: error: unknown argument: '-target-arch-variant'
With the same DEVELOPER_DIR, running swift package dump-package on that package by hand works, and picks MacOSX26.5.sdk. SDKROOT doesn't help: the manifest compile still resolves the SDK through xcrun.
Workaround
Point SKIP_COMMAND_OVERRIDE, which the generated task already honours, at a wrapper that restores DEVELOPER_DIR before it runs the real skip:
#!/bin/sh
export DEVELOPER_DIR="$KALISME_DEVELOPER_DIR"
exec "$KALISME_SKIP_REEL" "$@"
With it, skip export --debug --no-ios produces the APK and AAB.
Suggestion
Keep a non-empty DEVELOPER_DIR inherited from the caller (or clear it only when it points at an Xcode whose Swift doesn't match the selected toolchain), so the workaround from #714 still holds inside Gradle.
- 主要言語
- Swift
- スター
- 3.3k
- フォーク
- 115
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
skiptools/skip のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
enhancement project
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
skiptools/skip#673 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 1/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 66/100
521xueweihan/HelloGitHub#4445 ·
-
comment-reshape
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
callstackincubator/ai#378 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
nwverse/persona#12800 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信