Release 6.3#76
Conversation
| # Push trunk back to build against Android API 24 with NDK 28c | ||
| if [[ -n "${SWIFT_VERSION}" && ($SWIFT_VERSION == scheme:main || $SWIFT_VERSION == tag:swift-DEV*) ]]; then | ||
| ANDROID_NDK_VERSION=android-ndk-r28c | ||
| ANDROID_API=24 |
There was a problem hiding this comment.
Hardcoded clang version wrong for NDK r28c builds
Low Severity
The new trunk/dev NDK r28c support sets ANDROID_NDK_VERSION=android-ndk-r28c, but scripts/build.sh hardcodes ndk_clang_version=18 (line 272). NDK r28c ships clang 19 (resource dir lib/clang/19), so the placeholder symlink created during SDK bundling at line 706 of build.sh would point to a non-existent lib/clang/18 path. The setup-android-sdk.sh install script fixes this at install time via a glob, but the bundled artifact would contain a broken symlink for trunk builds.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit db49527. Configure here.
4b0f527 to
300eb54
Compare
digitalby
left a comment
There was a problem hiding this comment.
Took this for a spin. Mostly looks good, but flagging three things I think are blockers
|
|
||
| ``` | ||
| swift sdk install https://github.com/readdle/swift-android-toolchain/releases/download/6.2-r1/readdle-swift-6.2.1-RELEASE_android.artifactbundle.tar.gz --checksum 2057ecd9cf71fcd9beaded08d370f4815f867983c073f2d0010796aefdf8c2f1 | ||
| swift sdk install https://github.com/readdle/swift-android-toolchain/releases/download/6.3-r1/readdle-swift-6.3-RELEASE_android.artifactbundle.tar.gz --checksum <CHECKSUM> |
There was a problem hiding this comment.
<CHECKSUM> is still a literal placeholder here. Anyone who copypastes this install snippet on day one of the release is going to get a confusing error. Fill it in before merging (or at least before tagging 6.3-r1).
There was a problem hiding this comment.
Thank you, I’ll paste the final checksum when it’s ready
| rm ${WORKDIR}/source/swift-project/swift/test/Interop/SwiftToCxx/stdlib/stdlib-in-cxx-no-diagnostics-generated-header.cpp | ||
| rm ${WORKDIR}/source/swift-project/swift/test/Reflection/typeref_decoding_packs.swift | ||
| rm ${WORKDIR}/source/swift-project/swift/test/Reflection/typeref_lowering.swift | ||
| rm ${WORKDIR}/source/swift-project/swift/test/Reflection/typeref_lowering_packs.swift |
There was a problem hiding this comment.
These five rms run under set -ex, so the moment upstream renames or moves any of these test files the whole build aborts before it even starts. The intent here is "nuke these if they happen to be present", not "assert they exist", so rm -f is what you want. Same thing in build-local L82-86.
There was a problem hiding this comment.
| # error: could not find module '_Builtin_float' for target 'x86_64-unknown-linux-android'; found: aarch64-unknown-linux-android, at: /home/runner/work/_temp/swift-android-sdk/ndk/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/swift/android/_Builtin_float.swiftmodule | ||
| rm -rf $ndk_installation/sysroot/usr/lib/swift/android | ||
| rm -rf $ndk_installation/sysroot/usr/lib/swift/../swift_static/android | ||
| rm -rf $ndk_installation/sysroot/usr/lib/swift/../../../swift-linux-x86_64/lib/swift{,_static}/android |
There was a problem hiding this comment.
These .. traversals are a footgun. Line 517 resolves to $ndk_installation/sysroot/usr/lib/swift_static/android. Just write it that way?
Line 518 is the one that actually worries me: sysroot/usr/lib/swift/../../../swift-linux-x86_64/... walks three levels up from sysroot/usr/lib/swift, which lands at sysroot/, so the final path is $ndk_installation/sysroot/swift-linux-x86_64/lib/swift{,_static}/android. That is a pretty unusual place to find stale swift modules inside an NDK sysroot. Is that really where they end up, or is the intended target $ndk_installation/../swift-linux-x86_64/... (i.e. a sibling of the NDK in the build tree)? If that is the case, this rm -rf is silently a no-op and the actual stale dir is never cleaned.
There was a problem hiding this comment.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
There are 3 total unresolved issues (including 1 from previous review).
Bugbot Autofix prepared a fix for 1 of the 2 issues found in the latest run.
- ✅ Fixed: Bare
rmaborts build on missing test files- Replaced all five trunk test cleanup commands with
rm -fin bothbuild-dockerandbuild-localso missing files no longer abortset -escripts.
- Replaced all five trunk test cleanup commands with
Or push these changes by commenting:
@cursor push 83c8d9e19d
Preview (83c8d9e19d)
diff --git a/build-docker b/build-docker
--- a/build-docker
+++ b/build-docker
@@ -54,11 +54,11 @@
ANDROID_NDK_VERSION=android-ndk-r28c
ANDROID_API=24
- rm ${WORKDIR}/source/swift-project/swift/test/Interop/Cxx/class/invalid-members/stdlib-containers-of-incomplete.swift
- rm ${WORKDIR}/source/swift-project/swift/test/Interop/SwiftToCxx/stdlib/stdlib-in-cxx-no-diagnostics-generated-header.cpp
- rm ${WORKDIR}/source/swift-project/swift/test/Reflection/typeref_decoding_packs.swift
- rm ${WORKDIR}/source/swift-project/swift/test/Reflection/typeref_lowering.swift
- rm ${WORKDIR}/source/swift-project/swift/test/Reflection/typeref_lowering_packs.swift
+ rm -f ${WORKDIR}/source/swift-project/swift/test/Interop/Cxx/class/invalid-members/stdlib-containers-of-incomplete.swift
+ rm -f ${WORKDIR}/source/swift-project/swift/test/Interop/SwiftToCxx/stdlib/stdlib-in-cxx-no-diagnostics-generated-header.cpp
+ rm -f ${WORKDIR}/source/swift-project/swift/test/Reflection/typeref_decoding_packs.swift
+ rm -f ${WORKDIR}/source/swift-project/swift/test/Reflection/typeref_lowering.swift
+ rm -f ${WORKDIR}/source/swift-project/swift/test/Reflection/typeref_lowering_packs.swift
fi
pushd ${WORKDIR}/source/swift-project
diff --git a/build-local b/build-local
--- a/build-local
+++ b/build-local
@@ -79,11 +79,11 @@
# Disable failing trunk tests when building against NDK 28c
if [[ -n "${SWIFT_VERSION}" && ($SWIFT_VERSION == scheme:main || $SWIFT_VERSION == tag:swift-DEV*) ]]; then
- rm ${WORKDIR}/source/swift-project/swift/test/Interop/Cxx/class/invalid-members/stdlib-containers-of-incomplete.swift
- rm ${WORKDIR}/source/swift-project/swift/test/Interop/SwiftToCxx/stdlib/stdlib-in-cxx-no-diagnostics-generated-header.cpp
- rm ${WORKDIR}/source/swift-project/swift/test/Reflection/typeref_decoding_packs.swift
- rm ${WORKDIR}/source/swift-project/swift/test/Reflection/typeref_lowering.swift
- rm ${WORKDIR}/source/swift-project/swift/test/Reflection/typeref_lowering_packs.swift
+ rm -f ${WORKDIR}/source/swift-project/swift/test/Interop/Cxx/class/invalid-members/stdlib-containers-of-incomplete.swift
+ rm -f ${WORKDIR}/source/swift-project/swift/test/Interop/SwiftToCxx/stdlib/stdlib-in-cxx-no-diagnostics-generated-header.cpp
+ rm -f ${WORKDIR}/source/swift-project/swift/test/Reflection/typeref_decoding_packs.swift
+ rm -f ${WORKDIR}/source/swift-project/swift/test/Reflection/typeref_lowering.swift
+ rm -f ${WORKDIR}/source/swift-project/swift/test/Reflection/typeref_lowering_packs.swift
fi
mkdir -p ${WORKDIR}/productsThis Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6e3845d. Configure here.
Thank you for your review. Most of these scripts are just cherry-picked from the official CI, so issues with them are probably better raised there: Maybe it’s not clear from the documentation. I’ll add a note about it at the beginning. |
Bump all version references from 6.2 to 6.3 and sync build scripts with upstream swift-docker changes while keeping Readdle patches on top. Upstream additions: trunk/dev NDK 28c support, skip-clean build flags, and extra sysroot cleanup after Swift build.
Made-with: Cursor
f898d65 to
b2e77b6
Compare



Bump all version references from 6.2 to 6.3 and sync build scripts with upstream swift-docker changes while keeping Readdle patches on top. Upstream additions: trunk/dev NDK 28c support, skip-clean build flags, and extra sysroot cleanup after Swift build.
Note
Medium Risk
Medium risk because it upgrades the Swift toolchain to 6.3 and changes build/NDK behavior for trunk/dev builds, which can affect SDK reproducibility and CI build outputs.
Overview
Updates the Android Swift SDK release from 6.2.x to 6.3 across CI (
SWIFT_VERSION), documentation (install URLs, Gradle plugin version), and source-fetch defaults (release branch6.3).Syncs build scripts with upstream changes: trunk/dev builds now use NDK
r28cwith Android API 24 and remove a small set of known-failing trunk tests,build.shadds--skip-clean-*flags for faster/less destructive rebuilds, and performs additional sysroot cleanup after Swift builds.Adds a new Foundation patch that avoids a crash by ignoring late redirect callbacks in
HTTPURLProtocol.didCompleteRedirectCallbackwhen a timeout has already completed the task.Reviewed by Cursor Bugbot for commit b2e77b6. Bugbot is set up for automated code reviews on this repo. Configure here.