Skip to content

Release 6.3#76

Open
andriydruk wants to merge 2 commits into
mainfrom
release/6.3
Open

Release 6.3#76
andriydruk wants to merge 2 commits into
mainfrom
release/6.3

Conversation

@andriydruk
Copy link
Copy Markdown
Member

@andriydruk andriydruk commented Apr 11, 2026

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 branch 6.3).

Syncs build scripts with upstream changes: trunk/dev builds now use NDK r28c with Android API 24 and remove a small set of known-failing trunk tests, build.sh adds --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.didCompleteRedirectCallback when 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.

Comment thread build-docker
# 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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit db49527. Configure here.

@andriydruk andriydruk force-pushed the release/6.3 branch 5 times, most recently from 4b0f527 to 300eb54 Compare April 13, 2026 12:12
Copy link
Copy Markdown

@digitalby digitalby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took this for a spin. Mostly looks good, but flagging three things I think are blockers

Comment thread README.md

```
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>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<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).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I’ll paste the final checksum when it’s ready

Comment thread build-docker
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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread scripts/build.sh
# 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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

There are 3 total unresolved issues (including 1 from previous review).

Fix All in Cursor

Bugbot Autofix prepared a fix for 1 of the 2 issues found in the latest run.

  • ✅ Fixed: Bare rm aborts build on missing test files
    • Replaced all five trunk test cleanup commands with rm -f in both build-docker and build-local so missing files no longer abort set -e scripts.

Create PR

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}/products

This 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.

Comment thread build-docker
Comment thread scripts/build.sh
@andriydruk
Copy link
Copy Markdown
Member Author

Took this for a spin. Mostly looks good, but flagging three things I think are blockers

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:
https://github.com/swiftlang/swift-docker/tree/main/swift-ci/sdks/android

Maybe it’s not clear from the documentation. I’ll add a note about it at the beginning.

andriydruk and others added 2 commits April 21, 2026 22:30
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.
@andriydruk andriydruk force-pushed the release/6.3 branch 2 times, most recently from f898d65 to b2e77b6 Compare April 25, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants