From 9e07c2879a83613915ab2d4da67cd6fce8da673e Mon Sep 17 00:00:00 2001 From: Kyle Date: Mon, 27 Jul 2026 02:18:49 +0800 Subject: [PATCH 1/8] Update toolchains for Xcode 26.6 and Swift 6.3.3 --- .github/actions/build-xcframework/action.yml | 2 +- .github/actions/uitests/action.yml | 8 ++-- .github/workflows/compatibility_tests.yml | 23 +++-------- .github/workflows/documentation.yml | 2 +- .github/workflows/ios.yml | 15 +++---- .github/workflows/macos.yml | 6 +-- .github/workflows/stdout_renderer.yml | 4 +- .github/workflows/ubuntu.yml | 2 +- .github/workflows/uitests.yml | 4 +- .vdc.json | 3 -- Example/Tuist/Package.swift | 2 +- INTEGRATION.md | 4 +- Package.swift | 2 +- README.md | 2 +- Renderer/Stdout/Package.swift | 2 +- Renderer/Stdout/Tuist/Package.swift | 2 +- Renderer/Stdout/run-example.sh | 6 +-- Scripts/build-documentation.sh | 2 - Sources/OpenSwiftUICore/View/View.swift | 2 +- .../OpenSwiftUI_SPI/Shims/dyld/dyld_Private.h | 4 ++ .../Layout/Geometry/LayoutTraitsTests.swift | 2 - .../Semantic/SemanticsTests.swift | 40 +++++++++++++++++++ .../Shims/DyldPrivateTests.swift | 20 +++++----- 23 files changed, 86 insertions(+), 73 deletions(-) diff --git a/.github/actions/build-xcframework/action.yml b/.github/actions/build-xcframework/action.yml index 9fad0f245..ead5d9516 100644 --- a/.github/actions/build-xcframework/action.yml +++ b/.github/actions/build-xcframework/action.yml @@ -5,7 +5,7 @@ inputs: xcode-version: description: 'Xcode version to use' required: false - default: '26.3' + default: '26.6' tag-name: description: 'Tag name for release URLs (empty for manual builds)' required: false diff --git a/.github/actions/uitests/action.yml b/.github/actions/uitests/action.yml index d670a85c0..6b7649355 100644 --- a/.github/actions/uitests/action.yml +++ b/.github/actions/uitests/action.yml @@ -5,7 +5,7 @@ inputs: xcode-version: description: 'Xcode version to use' required: false - default: '26.3' + default: '26.6' platform: description: 'Platform to test (ios or macos)' required: true @@ -230,8 +230,7 @@ runs: set -o pipefail record_status=0 baseline_result_bundle="${RUNNER_TEMP:-/tmp}/swiftui-baseline-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT:-0}-${{ inputs.artifact-name }}.xcresult" - # Swift 6.2 can duplicate-link swift-syntax macro prebuilts; Swift 6.3 fixes this. - NSUnbufferedIO=YES tuist_xcodebuild "$baseline_result_bundle" test -IDEPackageEnablePrebuilts=NO \ + NSUnbufferedIO=YES tuist_xcodebuild "$baseline_result_bundle" test \ -workspace Example.xcworkspace \ -scheme SUI_UITests \ -destination "${{ inputs.destination }}" \ @@ -287,8 +286,7 @@ runs: echo "artifact_dir=$uitest_tmp/artifacts" >> "$GITHUB_OUTPUT" echo "xcresult_archive=$uitest_tmp/${{ inputs.artifact-name }}.xcresult.zip" >> "$GITHUB_OUTPUT" set -o pipefail - # Swift 6.2 can duplicate-link swift-syntax macro prebuilts; Swift 6.3 fixes this. - NSUnbufferedIO=YES tuist_xcodebuild "$result_bundle" test -IDEPackageEnablePrebuilts=NO \ + NSUnbufferedIO=YES tuist_xcodebuild "$result_bundle" test \ -workspace Example.xcworkspace \ -scheme OSUI_UITests \ -destination "${{ inputs.destination }}" \ diff --git a/.github/workflows/compatibility_tests.yml b/.github/workflows/compatibility_tests.yml index e97e2b902..3c736ddc4 100644 --- a/.github/workflows/compatibility_tests.yml +++ b/.github/workflows/compatibility_tests.yml @@ -29,7 +29,7 @@ jobs: fail-fast: false matrix: os: [macos-15] - xcode-version: ["26.3"] + xcode-version: ["26.6"] release: [2024] # Limit to self-hosted to reduce action cost runs-on: @@ -58,11 +58,7 @@ jobs: - name: Run compatibility tests on OpenSwiftUI + macOS run: | set -o pipefail - # Swift 6.2 can duplicate-link swift-syntax macro prebuilts; Swift 6.3 fixes this. - # Swift 6.2 also crashes while indexing AppKit with the private framework shims. NSUnbufferedIO=YES swift test \ - --disable-experimental-prebuilts \ - --disable-index-store \ --filter OpenSwiftUICompatibilityTests \ --build-path .build-compatibility-test-debug \ 2>&1 | xcbeautify --renderer github-actions --preserve-unbeautified @@ -71,11 +67,7 @@ jobs: - name: Run compatibility tests on SwiftUI + macOS run: | set -o pipefail - # Swift 6.2 can duplicate-link swift-syntax macro prebuilts; Swift 6.3 fixes this. - # Swift 6.2 also crashes while indexing AppKit with the private framework shims. NSUnbufferedIO=YES swift test \ - --disable-experimental-prebuilts \ - --disable-index-store \ --filter OpenSwiftUICompatibilityTests \ --build-path .build-compatibility-test-debug \ 2>&1 | xcbeautify --renderer github-actions --preserve-unbeautified @@ -90,7 +82,7 @@ jobs: fail-fast: false matrix: os: [macos-15] - xcode-version: ["26.3"] + xcode-version: ["26.6"] release: [2024] ios-version: ["18.5"] include: @@ -150,11 +142,9 @@ jobs: run: | set -o pipefail source Scripts/Tuist/common.sh - # Swift 6.2 can duplicate-link swift-syntax macro prebuilts; Swift 6.3 fixes this. - # Xcode 26.3 + iOS 18.5 fails to launch arm64 SwiftPM package test - # runners with CoreSimulator codesigning errors; force the x86_64 - # simulator slice until that launch path is fixed. - NSUnbufferedIO=YES tuist_xcodebuild "$OPENSWIFTUI_RESULT_BUNDLE_PATH" test -IDEPackageEnablePrebuilts=NO \ + # Keep the iOS 18.5 test runner on x86_64 until the arm64 launch path + # is validated with Xcode 26.6. + NSUnbufferedIO=YES tuist_xcodebuild "$OPENSWIFTUI_RESULT_BUNDLE_PATH" test \ -scheme OpenSwiftUI \ -configuration Debug \ -destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }},arch=x86_64" \ @@ -170,10 +160,9 @@ jobs: run: | set -o pipefail source Scripts/Tuist/common.sh - # Swift 6.2 can duplicate-link swift-syntax macro prebuilts; Swift 6.3 fixes this. # See the OpenSwiftUI iOS compatibility step above: force x86_64 to # avoid the arm64 package test runner launch/codesigning failure. - NSUnbufferedIO=YES tuist_xcodebuild "$SWIFTUI_RESULT_BUNDLE_PATH" test -IDEPackageEnablePrebuilts=NO \ + NSUnbufferedIO=YES tuist_xcodebuild "$SWIFTUI_RESULT_BUNDLE_PATH" test \ -scheme OpenSwiftUI \ -configuration Debug \ -destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }},arch=x86_64" \ diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 9c8e6ce14..d210e2fd0 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -36,7 +36,7 @@ jobs: - name: Setup Xcode uses: OpenSwiftUIProject/setup-xcode@v2 with: - xcode-version: "26.3" + xcode-version: "26.6" - name: Set up build environment run: Scripts/CI/darwin_setup_build.sh shell: bash diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 865d4604d..16df544c0 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -32,7 +32,7 @@ jobs: fail-fast: false matrix: os: [macos-15] - xcode-version: ["26.3"] + xcode-version: ["26.6"] release: [2024] ios-version: ["18.5"] include: @@ -93,12 +93,9 @@ jobs: run: | set -o pipefail source Scripts/Tuist/common.sh - # Xcode 26.3 + iOS 18.5 fails to launch arm64 SwiftPM package test - # runners with CoreSimulator codesigning errors. Build the x86_64 - # simulator slice to match the test command below until that is fixed. - # Swift 6.2 macro prebuilts do not support the x86_64 simulator - # testable macro target, so build SwiftSyntax from source instead. - NSUnbufferedIO=YES tuist_xcodebuild "$BUILD_RESULT_BUNDLE_PATH" build -IDEPackageEnablePrebuilts=NO \ + # Keep the iOS 18.5 test runner on x86_64 until the arm64 launch path + # is validated with Xcode 26.6. Build the matching simulator slice. + NSUnbufferedIO=YES tuist_xcodebuild "$BUILD_RESULT_BUNDLE_PATH" build \ -scheme OpenSwiftUI \ -configuration Debug \ -destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }},arch=x86_64" \ @@ -112,8 +109,8 @@ jobs: set -o pipefail source Scripts/Tuist/common.sh # See the build step above: force x86_64 to avoid the arm64 package - # test runner launch/codesigning failure on this Xcode/iOS pair. - NSUnbufferedIO=YES tuist_xcodebuild "$TEST_RESULT_BUNDLE_PATH" test -IDEPackageEnablePrebuilts=NO \ + # test runner launch/codesigning failure seen on the previous toolchain. + NSUnbufferedIO=YES tuist_xcodebuild "$TEST_RESULT_BUNDLE_PATH" test \ -scheme OpenSwiftUI \ -configuration Debug \ -destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }},arch=x86_64" \ diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 0e14ef396..948a6a74b 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -25,7 +25,7 @@ jobs: fail-fast: false matrix: os: [macos-15] - xcode-version: ["26.3"] + xcode-version: ["26.6"] release: [2024] # Limit to self-hosted to reduce action cost runs-on: @@ -57,11 +57,7 @@ jobs: - name: Build and run tests in debug mode with coverage run: | set -o pipefail - # Swift 6.2 can duplicate-link swift-syntax macro prebuilts; Swift 6.3 fixes this. - # Swift 6.2 also crashes while indexing AppKit with the private framework shims. NSUnbufferedIO=YES swift test \ - --disable-experimental-prebuilts \ - --disable-index-store \ -c debug \ --filter OpenSwiftUITests \ --filter OpenSwiftUICoreTests \ diff --git a/.github/workflows/stdout_renderer.yml b/.github/workflows/stdout_renderer.yml index 456aa0a1a..9f2cd92e2 100644 --- a/.github/workflows/stdout_renderer.yml +++ b/.github/workflows/stdout_renderer.yml @@ -24,7 +24,7 @@ jobs: # stdout_renderer_linux: # name: Run stdout renderer on Linux # runs-on: ubuntu-22.04 - # container: swift:6.2.4-jammy + # container: swift:6.3.3-jammy # env: # OPENSWIFTUI_WERROR: 0 # OPENSWIFTUI_SWIFT_LOG: 1 @@ -40,7 +40,7 @@ jobs: fail-fast: false matrix: os: [macos-15] - xcode-version: ["26.3"] + xcode-version: ["26.6"] release: [2024] backend: [AttributeGraph, Compute] include: diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 76a412cea..153b8b8ba 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - swift_version: ["6.2.4"] + swift_version: ["6.3.3"] runs-on: ubuntu-22.04 env: OPENSWIFTUI_WERROR: 0 # Disable it to avoid enable OAG's werror and hit conflicts diff --git a/.github/workflows/uitests.yml b/.github/workflows/uitests.yml index a187a7de6..63281df92 100644 --- a/.github/workflows/uitests.yml +++ b/.github/workflows/uitests.yml @@ -271,7 +271,7 @@ jobs: fail-fast: false matrix: os: [macos-15] - xcode-version: ["26.3"] + xcode-version: ["26.6"] release: [2024] ios-version: ["18.5"] configuration: ${{ fromJSON(needs.prepare_uitests.outputs.configuration-matrix) }} @@ -370,7 +370,7 @@ jobs: fail-fast: false matrix: os: [macos-15] - xcode-version: ["26.3"] + xcode-version: ["26.6"] release: [2024] configuration: ${{ fromJSON(needs.prepare_uitests.outputs.configuration-matrix) }} # Limit to self-hosted to reduce action cost diff --git a/.vdc.json b/.vdc.json index 842a8f390..caab96c11 100644 --- a/.vdc.json +++ b/.vdc.json @@ -67,9 +67,6 @@ "openobservation": "../OpenObservation", "openrenderbox": "../OpenRenderBox" }, - "buildArguments": [ - "--disable-index-store" - ], "doccArguments": [ "--emit-digest" ] diff --git a/Example/Tuist/Package.swift b/Example/Tuist/Package.swift index ce5b7ceae..2f0b9fda4 100644 --- a/Example/Tuist/Package.swift +++ b/Example/Tuist/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 6.2 +// swift-tools-version: 6.3 import PackageDescription diff --git a/INTEGRATION.md b/INTEGRATION.md index 9c24afa30..24aa56483 100644 --- a/INTEGRATION.md +++ b/INTEGRATION.md @@ -4,8 +4,8 @@ This guide walks you through the steps to integrate OpenSwiftUI into your projec ## Prerequisites -- Xcode 26.3 -- Swift 6.2.4+ +- Xcode 26.6 +- Swift 6.3.3+ ## Important Notes diff --git a/Package.swift b/Package.swift index 3f7c56bb7..735d3b9bf 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 6.2 +// swift-tools-version: 6.3 import CompilerPluginSupport import Foundation diff --git a/README.md b/README.md index 32f45c35a..10b78ced8 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ See Example folder and try it with ExampleApp ## Build -The current suggested toolchain to build the project is Swift 6.2.4 / Xcode 26.3 with macOS 15.5 or iOS 18.5 Simulator. +The current suggested toolchain to build the project is Swift 6.3.3 / Xcode 26.6. ### Build without testing framework diff --git a/Renderer/Stdout/Package.swift b/Renderer/Stdout/Package.swift index 0bbde667a..7b2021419 100644 --- a/Renderer/Stdout/Package.swift +++ b/Renderer/Stdout/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 6.2 +// swift-tools-version: 6.3 import PackageDescription diff --git a/Renderer/Stdout/Tuist/Package.swift b/Renderer/Stdout/Tuist/Package.swift index 419905d7a..a103850c2 100644 --- a/Renderer/Stdout/Tuist/Package.swift +++ b/Renderer/Stdout/Tuist/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 6.2 +// swift-tools-version: 6.3 import PackageDescription diff --git a/Renderer/Stdout/run-example.sh b/Renderer/Stdout/run-example.sh index ed9926ead..181fc85bc 100755 --- a/Renderer/Stdout/run-example.sh +++ b/Renderer/Stdout/run-example.sh @@ -4,14 +4,10 @@ set -euo pipefail cd "$(dirname "${BASH_SOURCE[0]}")" -swift_run_options=() - case "$(uname -s)" in Darwin) export OPENSWIFTUI_OPENATTRIBUTESHIMS_ATTRIBUTEGRAPH="${OPENSWIFTUI_OPENATTRIBUTESHIMS_ATTRIBUTEGRAPH:-1}" export OPENSWIFTUI_OPENATTRIBUTESHIMS_COMPUTE="${OPENSWIFTUI_OPENATTRIBUTESHIMS_COMPUTE:-0}" - # Swift 6.2 crashes while indexing AppKit with the local private framework shims. - swift_run_options+=(--disable-index-store) ;; *) export OPENSWIFTUI_OPENATTRIBUTESHIMS_ATTRIBUTEGRAPH="${OPENSWIFTUI_OPENATTRIBUTESHIMS_ATTRIBUTEGRAPH:-0}" @@ -20,4 +16,4 @@ Darwin) ;; esac -exec swift run "${swift_run_options[@]}" ExampleApp "$@" +exec swift run ExampleApp "$@" diff --git a/Scripts/build-documentation.sh b/Scripts/build-documentation.sh index c1ac8a9fd..491066983 100755 --- a/Scripts/build-documentation.sh +++ b/Scripts/build-documentation.sh @@ -262,9 +262,7 @@ if [[ "$REBUILD_NEEDED" == true ]] || [[ "$CLEAN_BUILD" == true ]]; then fi log_info "Generating symbol graphs..." - # Swift 6.2 crashes while indexing AppKit with the local private framework shims. swift build \ - --disable-index-store \ --target "$TARGET_NAME" \ -Xswiftc -emit-symbol-graph \ -Xswiftc -emit-symbol-graph-dir \ diff --git a/Sources/OpenSwiftUICore/View/View.swift b/Sources/OpenSwiftUICore/View/View.swift index 8586cd0bd..22bae44e6 100644 --- a/Sources/OpenSwiftUICore/View/View.swift +++ b/Sources/OpenSwiftUICore/View/View.swift @@ -45,7 +45,7 @@ import OpenSwiftUI_SPI /// You can also collect groups of default modifiers into new, /// custom view modifiers for easy reuse. @available(OpenSwiftUI_v1_0, *) -#if OPENSWIFTUI_SUPPORT_2025_API && compiler(>=6.2) +#if OPENSWIFTUI_SUPPORT_2025_API @_typeEraser(DebugReplaceableView) #endif @_typeEraser(AnyView) diff --git a/Sources/OpenSwiftUI_SPI/Shims/dyld/dyld_Private.h b/Sources/OpenSwiftUI_SPI/Shims/dyld/dyld_Private.h index a1b878e94..ba5809998 100644 --- a/Sources/OpenSwiftUI_SPI/Shims/dyld/dyld_Private.h +++ b/Sources/OpenSwiftUI_SPI/Shims/dyld/dyld_Private.h @@ -102,6 +102,8 @@ typedef OPENSWIFTUI_ENUM(uint32_t, DYLD_MACOSX_VERSION) { DYLD_MACOSX_VERSION_26_1 = 0x001A0100, DYLD_MACOSX_VERSION_26_2 = 0x001A0200, DYLD_MACOSX_VERSION_26_3 = 0x001A0300, + DYLD_MACOSX_VERSION_26_4 = 0x001A0400, + DYLD_MACOSX_VERSION_26_5 = 0x001A0500, }; typedef OPENSWIFTUI_ENUM(uint32_t, DYLD_IOS_VERSION) { @@ -133,6 +135,8 @@ typedef OPENSWIFTUI_ENUM(uint32_t, DYLD_IOS_VERSION) { DYLD_IOS_VERSION_26_1 = 0x001A0100, DYLD_IOS_VERSION_26_2 = 0x001A0200, DYLD_IOS_VERSION_26_3 = 0x001A0300, + DYLD_IOS_VERSION_26_4 = 0x001A0400, + DYLD_IOS_VERSION_26_5 = 0x001A0500, }; // Returns the active platform of the process diff --git a/Tests/OpenSwiftUICoreTests/Layout/Geometry/LayoutTraitsTests.swift b/Tests/OpenSwiftUICoreTests/Layout/Geometry/LayoutTraitsTests.swift index a770965bf..c1fc6fef9 100644 --- a/Tests/OpenSwiftUICoreTests/Layout/Geometry/LayoutTraitsTests.swift +++ b/Tests/OpenSwiftUICoreTests/Layout/Geometry/LayoutTraitsTests.swift @@ -86,7 +86,6 @@ struct LayoutTraitsTests { ]) func exitTest(_ min: CGFloat, _ ideal: CGFloat, _ max: CGFloat, _ expectedFailure: Bool) async { if expectedFailure { - #if compiler(>=6.3) // ST-12 #if !os(iOS) && !os(visionOS) await #expect(processExitsWith: .failure) { [min, ideal, max] in _ = Dimension(min: min, ideal: ideal, max: max) @@ -96,7 +95,6 @@ struct LayoutTraitsTests { d.min = min } #endif - #endif } else { _ = Dimension(min: min, ideal: ideal, max: max) var d = Dimension.fixed(.zero) diff --git a/Tests/OpenSwiftUICoreTests/Semantic/SemanticsTests.swift b/Tests/OpenSwiftUICoreTests/Semantic/SemanticsTests.swift index 51bd30298..bf31ed5a9 100644 --- a/Tests/OpenSwiftUICoreTests/Semantic/SemanticsTests.swift +++ b/Tests/OpenSwiftUICoreTests/Semantic/SemanticsTests.swift @@ -83,6 +83,28 @@ struct SemanticsTests { #expect(isDeployedOnOrAfter(.v5) == false) #expect(isDeployedOnOrAfter(.v6) == false) #expect(isDeployedOnOrAfter(.v7) == false) + #elseif compiler(>=6.3) + // Path: Xcode-26.6.0.app Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/xctest + // SDK version: iOS 26.4 + // min version: iOS 13.0 (x86_64) & iOS 14.0 (arm64) + #expect(isLinkedOnOrAfter(.v1) == true) + #expect(isLinkedOnOrAfter(.v2) == true) + #expect(isLinkedOnOrAfter(.v3) == true) + #expect(isLinkedOnOrAfter(.v4) == true) + #expect(isLinkedOnOrAfter(.v5) == true) + #expect(isLinkedOnOrAfter(.v6) == true) + #expect(isLinkedOnOrAfter(.v7) == true) + #expect(isDeployedOnOrAfter(.v1) == true) + #if arch(arm64) + #expect(isDeployedOnOrAfter(.v2) == true) + #else + #expect(isDeployedOnOrAfter(.v2) == false) + #endif + #expect(isDeployedOnOrAfter(.v3) == false) + #expect(isDeployedOnOrAfter(.v4) == false) + #expect(isDeployedOnOrAfter(.v5) == false) + #expect(isDeployedOnOrAfter(.v6) == false) + #expect(isDeployedOnOrAfter(.v7) == false) #endif #elseif os(macOS) #if compiler(<6.2) && compiler(>=6.1) @@ -121,6 +143,24 @@ struct SemanticsTests { #expect(isDeployedOnOrAfter(.v5) == true) #expect(isDeployedOnOrAfter(.v6) == false) #expect(isDeployedOnOrAfter(.v7) == false) + #elseif compiler(>=6.3) + // Path: Xcode-26.6.0.app Platforms/MacOSX.platform/Developer/Library/Xcode/Agents/xctest + // SDK version: macOS 26.4 + // min version: macOS 14.0 + #expect(isLinkedOnOrAfter(.v1) == true) + #expect(isLinkedOnOrAfter(.v2) == true) + #expect(isLinkedOnOrAfter(.v3) == true) + #expect(isLinkedOnOrAfter(.v4) == true) + #expect(isLinkedOnOrAfter(.v5) == true) + #expect(isLinkedOnOrAfter(.v6) == true) + #expect(isLinkedOnOrAfter(.v7) == true) + #expect(isDeployedOnOrAfter(.v1) == true) + #expect(isDeployedOnOrAfter(.v2) == true) + #expect(isDeployedOnOrAfter(.v3) == true) + #expect(isDeployedOnOrAfter(.v4) == true) + #expect(isDeployedOnOrAfter(.v5) == true) + #expect(isDeployedOnOrAfter(.v6) == false) + #expect(isDeployedOnOrAfter(.v7) == false) #endif #endif } diff --git a/Tests/OpenSwiftUI_SPITests/Shims/DyldPrivateTests.swift b/Tests/OpenSwiftUI_SPITests/Shims/DyldPrivateTests.swift index 4ac138cb3..7c484b3ec 100644 --- a/Tests/OpenSwiftUI_SPITests/Shims/DyldPrivateTests.swift +++ b/Tests/OpenSwiftUI_SPITests/Shims/DyldPrivateTests.swift @@ -20,16 +20,16 @@ struct DyldPrivateTests { #expect(dyld_program_sdk_at_least(activePlatformBuildVersion(.min)) == true) #if os(iOS) || os(visionOS) - // Path: Xcode-26.3.0.app Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/xctest - // SDK version: iOS 26.2 - #expect(dyld_program_sdk_at_least(activePlatformBuildVersion(DYLD_IOS_VERSION._26_3.rawValue)) == false) - #expect(dyld_program_sdk_at_least(activePlatformBuildVersion(DYLD_IOS_VERSION._26_2.rawValue)) == true) + // Path: Xcode-26.6.0.app Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/xctest + // SDK version: iOS 26.4 + #expect(dyld_program_sdk_at_least(activePlatformBuildVersion(DYLD_IOS_VERSION._26_5.rawValue)) == false) + #expect(dyld_program_sdk_at_least(activePlatformBuildVersion(DYLD_IOS_VERSION._26_4.rawValue)) == true) #expect(dyld_program_sdk_at_least(activePlatformBuildVersion(DYLD_IOS_VERSION._26_0.rawValue)) == true) #elseif os(macOS) - // Path: Xcode-26.3.0.app Platforms/MacOSX.platform/Developer/Library/Xcode/Agents/xctest - // SDK version: macOS 26.2 - #expect(dyld_program_sdk_at_least(activePlatformBuildVersion(DYLD_MACOSX_VERSION._26_3.rawValue)) == false) - #expect(dyld_program_sdk_at_least(activePlatformBuildVersion(DYLD_MACOSX_VERSION._26_2.rawValue)) == true) + // Path: Xcode-26.6.0.app Platforms/MacOSX.platform/Developer/Library/Xcode/Agents/xctest + // SDK version: macOS 26.4 + #expect(dyld_program_sdk_at_least(activePlatformBuildVersion(DYLD_MACOSX_VERSION._26_5.rawValue)) == false) + #expect(dyld_program_sdk_at_least(activePlatformBuildVersion(DYLD_MACOSX_VERSION._26_4.rawValue)) == true) #expect(dyld_program_sdk_at_least(activePlatformBuildVersion(DYLD_MACOSX_VERSION._26_0.rawValue)) == true) #else preconditionFailure("Unsupported Darwin platform") @@ -47,7 +47,7 @@ struct DyldPrivateTests { #expect(dyld_program_minos_at_least(activePlatformBuildVersion(.max)) == false) #expect(dyld_program_minos_at_least(activePlatformBuildVersion(.min)) == true) #if os(iOS) || os(visionOS) - // Path: Xcode-26.3.0.app Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/xctest + // Path: Xcode-26.6.0.app Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/xctest // min version: iOS 13.0 (x86_64) & iOS 14.0 (arm64) #expect(dyld_program_minos_at_least(activePlatformBuildVersion(DYLD_IOS_VERSION._26_0.rawValue)) == false) #expect(dyld_program_minos_at_least(activePlatformBuildVersion(DYLD_IOS_VERSION._15_0.rawValue)) == false) @@ -58,7 +58,7 @@ struct DyldPrivateTests { #endif #expect(dyld_program_minos_at_least(activePlatformBuildVersion(DYLD_IOS_VERSION._13_0.rawValue)) == true) #elseif os(macOS) - // Path: Xcode-26.3.0.app Platforms/MacOSX.platform/Developer/Library/Xcode/Agents/xctest + // Path: Xcode-26.6.0.app Platforms/MacOSX.platform/Developer/Library/Xcode/Agents/xctest // min version: macOS 14.0 #expect(dyld_program_minos_at_least(activePlatformBuildVersion(DYLD_MACOSX_VERSION._26_0.rawValue)) == false) #expect(dyld_program_minos_at_least(activePlatformBuildVersion(DYLD_MACOSX_VERSION._15_0.rawValue)) == false) From d2741762189e70e1009a0eadccdd99174c22f4ab Mon Sep 17 00:00:00 2001 From: Kyle Date: Sat, 15 Aug 2026 15:21:01 +0800 Subject: [PATCH 2/8] Require Xcode 26.6 runner labels --- .github/workflows/build_xcframework.yml | 4 +++- .github/workflows/compatibility_tests.yml | 6 ++---- .github/workflows/documentation.yml | 2 +- .github/workflows/ios.yml | 3 +-- .github/workflows/macos.yml | 3 +-- .github/workflows/release.yml | 4 +++- .github/workflows/stdout_renderer.yml | 2 +- .github/workflows/uitests.yml | 6 ++---- 8 files changed, 14 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build_xcframework.yml b/.github/workflows/build_xcframework.yml index db3625d8c..912af9d40 100644 --- a/.github/workflows/build_xcframework.yml +++ b/.github/workflows/build_xcframework.yml @@ -10,7 +10,9 @@ permissions: jobs: build_xcframework: name: Build XCFrameworks - runs-on: macos-15 + runs-on: + - macos-15 + - xcode-26.6 env: OPENSWIFTUI_OPENATTRIBUTESHIMS_ATTRIBUTEGRAPH: 1 OPENSWIFTUI_USE_LOCAL_DEPS: 1 diff --git a/.github/workflows/compatibility_tests.yml b/.github/workflows/compatibility_tests.yml index 3c736ddc4..1eb6768ff 100644 --- a/.github/workflows/compatibility_tests.yml +++ b/.github/workflows/compatibility_tests.yml @@ -31,10 +31,9 @@ jobs: os: [macos-15] xcode-version: ["26.6"] release: [2024] - # Limit to self-hosted to reduce action cost runs-on: - - self-hosted - ${{ matrix.os }} + - xcode-26.6 env: OPENSWIFTUI_WERROR: 0 # Disable it to avoid enable OAG's werror and hit conflicts OPENSWIFTUI_OPENATTRIBUTESHIMS_ATTRIBUTEGRAPH: 1 @@ -88,10 +87,9 @@ jobs: include: - ios-version: "18.5" ios-simulator-name: "iPhone 16 Pro" - # Limit to self-hosted to reduce action cost runs-on: - - self-hosted - ${{ matrix.os }} + - xcode-26.6 env: OPENSWIFTUI_WERROR: 0 # Disable it to avoid enable OAG's werror and hit conflicts OPENSWIFTUI_OPENATTRIBUTESHIMS_ATTRIBUTEGRAPH: 1 diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index d210e2fd0..17b74c6f1 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -14,8 +14,8 @@ jobs: build: name: Build DocC site runs-on: - - self-hosted - macos-15 + - xcode-26.6 env: OPENSWIFTUI_WERROR: 0 OPENSWIFTUI_OPENATTRIBUTESHIMS_ATTRIBUTEGRAPH: 1 diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 16df544c0..8f2add6dc 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -38,10 +38,9 @@ jobs: include: - ios-version: "18.5" ios-simulator-name: "iPhone 16 Pro" - # Limit to self-hosted to reduce action cost runs-on: - - self-hosted - ${{ matrix.os }} + - xcode-26.6 env: OPENSWIFTUI_WERROR: 0 # Disable it to avoid enable OAG's werror and hit conflicts OPENSWIFTUI_OPENATTRIBUTESHIMS_ATTRIBUTEGRAPH: 1 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 948a6a74b..e35690bc4 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -27,10 +27,9 @@ jobs: os: [macos-15] xcode-version: ["26.6"] release: [2024] - # Limit to self-hosted to reduce action cost runs-on: - - self-hosted - ${{ matrix.os }} + - xcode-26.6 env: OPENSWIFTUI_WERROR: 0 # Disable it to avoid enable OAG's werror and hit conflicts OPENSWIFTUI_OPENATTRIBUTESHIMS_ATTRIBUTEGRAPH: 1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 923dcffdf..61936bbbe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,9 @@ permissions: jobs: build-xcframeworks: name: Build and Upload XCFrameworks - runs-on: macos-15 + runs-on: + - macos-15 + - xcode-26.6 outputs: checksum_OpenSwiftUI: ${{ steps.build.outputs.checksum_OpenSwiftUI }} checksum_OpenSwiftUICore: ${{ steps.build.outputs.checksum_OpenSwiftUICore }} diff --git a/.github/workflows/stdout_renderer.yml b/.github/workflows/stdout_renderer.yml index 9f2cd92e2..ff57320bd 100644 --- a/.github/workflows/stdout_renderer.yml +++ b/.github/workflows/stdout_renderer.yml @@ -51,8 +51,8 @@ jobs: attributegraph: "0" compute: "1" runs-on: - - self-hosted - ${{ matrix.os }} + - xcode-26.6 env: OPENSWIFTUI_WERROR: 0 OPENSWIFTUI_TARGET_RELEASE: ${{ matrix.release }} diff --git a/.github/workflows/uitests.yml b/.github/workflows/uitests.yml index 63281df92..b82de7834 100644 --- a/.github/workflows/uitests.yml +++ b/.github/workflows/uitests.yml @@ -278,10 +278,9 @@ jobs: include: - ios-version: "18.5" ios-simulator-name: "iPhone 16 Pro" - # Limit to self-hosted to reduce action cost runs-on: - - self-hosted - ${{ matrix.os }} + - xcode-26.6 env: STATUS_CONTEXT: UI Tests / iOS / ${{ matrix.configuration.id }} STATUS_ENABLED: ${{ needs.prepare_uitests.outputs.status-enabled }} @@ -373,10 +372,9 @@ jobs: xcode-version: ["26.6"] release: [2024] configuration: ${{ fromJSON(needs.prepare_uitests.outputs.configuration-matrix) }} - # Limit to self-hosted to reduce action cost runs-on: - - self-hosted - ${{ matrix.os }} + - xcode-26.6 env: STATUS_CONTEXT: UI Tests / macOS / ${{ matrix.configuration.id }} STATUS_ENABLED: ${{ needs.prepare_uitests.outputs.status-enabled }} From fd1e026117f0c99ae20a3e6b155fbd46b8d81129 Mon Sep 17 00:00:00 2001 From: Kyle Date: Sat, 15 Aug 2026 22:50:32 +0800 Subject: [PATCH 3/8] Update Tuist to 4.203.4 --- mise.compute.toml | 2 +- mise.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mise.compute.toml b/mise.compute.toml index ea288356c..cfdc082ab 100644 --- a/mise.compute.toml +++ b/mise.compute.toml @@ -1,5 +1,5 @@ [tools] -tuist = "4.203.1" +tuist = "4.203.4" [env] TUIST_USE_SWIFTERPM=1 diff --git a/mise.toml b/mise.toml index df8cdc78c..8952e958a 100644 --- a/mise.toml +++ b/mise.toml @@ -1,5 +1,5 @@ [tools] -tuist = "4.203.1" +tuist = "4.203.4" [env] TUIST_USE_SWIFTERPM=1 From 22d574f31561b1b9ab13667afed289d20aabcc7b Mon Sep 17 00:00:00 2001 From: Kyle Date: Sat, 15 Aug 2026 22:50:44 +0800 Subject: [PATCH 4/8] Document Swift 6.3 toolchain update --- Docs/Toolchain/CHANGELOG.md | 91 +++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/Docs/Toolchain/CHANGELOG.md b/Docs/Toolchain/CHANGELOG.md index fcd8d065f..326bfa90f 100644 --- a/Docs/Toolchain/CHANGELOG.md +++ b/Docs/Toolchain/CHANGELOG.md @@ -5,6 +5,7 @@ found while validating CI, package dependencies, and platform-specific tests. | Date | OpenSwiftUI PR | Toolchain move | Notes | | --- | --- | --- | --- | +| 2026-07-27 | [#987](https://github.com/OpenSwiftUIProject/OpenSwiftUI/pull/987) | Xcode 26.3 / Swift 6.2.4 to Xcode 26.6 / Swift 6.3.3 | Updated package manifests and CI, removed Swift 6.2 index-store and package-prebuilt workarounds, and refreshed SDK-linked test expectations. | | 2026-06-09 | [#902](https://github.com/OpenSwiftUIProject/OpenSwiftUI/pull/902) | Add Xcode 27 / SDK 27 support | Added SDK 26/27 addition guards and updated UIFoundation shims while keeping Xcode 26.3 / macOS 26.2 compatibility. | | 2026-06-07 | [#899](https://github.com/OpenSwiftUIProject/OpenSwiftUI/pull/899) | Xcode 16.4 / Swift 6.1 to Xcode 26.3 / Swift 6.2.4 | Kept `macos-15` and iOS 18.5 while documenting the Linux compiler crash, index store, prebuilt package, runtime issue, and Linux dyld shim workarounds. | | 2025-11-18 | [#634](https://github.com/OpenSwiftUIProject/OpenSwiftUI/pull/634) | Initial Xcode 26 SDK support | Added SDK 26 compatibility without moving CI to iOS 26 or macOS 26 destinations. | @@ -12,6 +13,96 @@ found while validating CI, package dependencies, and platform-specific tests. | 2025-04-05 | [#241](https://github.com/OpenSwiftUIProject/OpenSwiftUI/pull/241) | Xcode version selector cleanup | `16.0` resolved to Xcode 16.3 in setup tooling, so CI was changed to use a precise Xcode version. | | 2024-09-17 | [#118](https://github.com/OpenSwiftUIProject/OpenSwiftUI/pull/118) | Add Xcode 16 and Swift 6 support on macOS | Closed [#117](https://github.com/OpenSwiftUIProject/OpenSwiftUI/issues/117). Also updated Linux/Wasm Swift 6 nightly jobs and fixed several Swift 6 warnings and iOS 18 test issues. | +## Swift 6.3 + +OpenSwiftUI PR: [#987](https://github.com/OpenSwiftUIProject/OpenSwiftUI/pull/987) + +Dependency PRs: + +- OpenSwiftUIProject/DarwinPrivateFrameworks#TBD +- OpenSwiftUIProject/OpenAttributeGraph#234 +- OpenSwiftUIProject/OpenRenderBox#TBD +- jcmosc/Compute#TBD + +Use the following dependency section in the OpenSwiftUI PR body: + +```markdown +## Dependency + +- OpenSwiftUIProject/DarwinPrivateFrameworks#TBD +- OpenSwiftUIProject/OpenAttributeGraph#234 +- OpenSwiftUIProject/OpenRenderBox#TBD +- jcmosc/Compute#TBD +``` + +### Version Targets + +- Apple platforms: Xcode 26.6 / Swift 6.3.3. +- Linux: Swift 6.3.3. +- Swift tools version: 6.3 for the root and nested packages updated by this + bump. +- Runner and destinations: require `macos-15` and `xcode-26.6` runner labels, + and keep iOS simulator tests on iOS 18.5. + +### Package Manifests + +Update the root and nested package entry points together: + +- `Package.swift` +- `Example/Tuist/Package.swift` +- `Renderer/Stdout/Package.swift` +- `Renderer/Stdout/Tuist/Package.swift` + +The corresponding DarwinPrivateFrameworks, OpenAttributeGraph, and +OpenRenderBox manifests also move to Swift tools version 6.3. + +### Removed Swift 6.2 Workarounds + +Swift 6.3 no longer needs the following workarounds introduced by the previous +toolchain bump: + +- Remove `--disable-index-store` from OpenAttributeGraph SwiftPM test jobs. +- Remove `COMPILER_INDEX_STORE_ENABLE=NO` from OpenAttributeGraph Xcode and + Tuist configurations. +- Remove `--disable-index-store` from OpenSwiftUI documentation and Stdout + renderer tooling. +- Remove `--disable-experimental-prebuilts` from OpenSwiftUI SwiftPM jobs. +- Remove `-IDEPackageEnablePrebuilts=NO` from OpenSwiftUI Xcode jobs. +- Remove compiler-version guards that are redundant once the package requires + Swift 6.3. + +Keep the iOS 18.5 test runner on x86_64 until the arm64 launch path is +separately validated with Xcode 26.6. This workaround addresses the simulator +runner launch failure seen with the previous toolchain and is not removed by +this bump without runtime evidence. + +### SDK-Linked Test Expectations + +Xcode 26.6 ships an `xctest` binary linked against SDK 26.4: + +- iPhone Simulator: SDK 26.4, minimum iOS 13.0 on x86_64 and iOS 14.0 on + arm64. +- macOS: SDK 26.4, minimum macOS 14.0. + +Update the dyld shim constants and tests accordingly: + +- Add iOS and macOS 26.4 and 26.5 version constants. +- Expect `dyld_program_sdk_at_least(26.5)` to be `false`. +- Expect `dyld_program_sdk_at_least(26.4)` to be `true`. +- Update semantic linked-on-or-after expectations so the 2025 semantic version + is enabled for SDK 26.4. + +### Validation + +- Parse all changed workflow YAML files. +- Run `swift package dump-package` with Xcode 26.6 for each updated root and + nested package. +- Inspect the Xcode 26.6 `xctest` Mach-O build-version commands for SDK and + minimum deployment versions. +- Run `git diff --check` in each changed repository. +- Do not run full OpenSwiftUI builds by default for this metadata and + compatibility update. + ## Xcode 27 SDK OpenSwiftUI PR: [#902](https://github.com/OpenSwiftUIProject/OpenSwiftUI/pull/902) From a23265482eccdef6a92b17f285e001d1832c3444 Mon Sep 17 00:00:00 2001 From: Kyle Date: Sat, 15 Aug 2026 22:53:10 +0800 Subject: [PATCH 5/8] Remove iOS simulator x86_64 workaround --- .github/workflows/compatibility_tests.yml | 10 ++-------- .github/workflows/ios.yml | 10 ++-------- Docs/Toolchain/CHANGELOG.md | 5 ----- 3 files changed, 4 insertions(+), 21 deletions(-) diff --git a/.github/workflows/compatibility_tests.yml b/.github/workflows/compatibility_tests.yml index 1eb6768ff..26d683973 100644 --- a/.github/workflows/compatibility_tests.yml +++ b/.github/workflows/compatibility_tests.yml @@ -140,17 +140,14 @@ jobs: run: | set -o pipefail source Scripts/Tuist/common.sh - # Keep the iOS 18.5 test runner on x86_64 until the arm64 launch path - # is validated with Xcode 26.6. NSUnbufferedIO=YES tuist_xcodebuild "$OPENSWIFTUI_RESULT_BUNDLE_PATH" test \ -scheme OpenSwiftUI \ -configuration Debug \ - -destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }},arch=x86_64" \ + -destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \ -only-testing:OpenSwiftUICompatibilityTests \ -derivedDataPath "$OPENSWIFTUI_DERIVED_DATA_PATH" \ -skipMacroValidation \ -skipPackagePluginValidation \ - ONLY_ACTIVE_ARCH=YES \ 2>&1 | xcbeautify --renderer github-actions --preserve-unbeautified env: OPENSWIFTUI_COMPATIBILITY_TEST: 0 @@ -158,17 +155,14 @@ jobs: run: | set -o pipefail source Scripts/Tuist/common.sh - # See the OpenSwiftUI iOS compatibility step above: force x86_64 to - # avoid the arm64 package test runner launch/codesigning failure. NSUnbufferedIO=YES tuist_xcodebuild "$SWIFTUI_RESULT_BUNDLE_PATH" test \ -scheme OpenSwiftUI \ -configuration Debug \ - -destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }},arch=x86_64" \ + -destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \ -only-testing:OpenSwiftUICompatibilityTests \ -derivedDataPath "$SWIFTUI_DERIVED_DATA_PATH" \ -skipMacroValidation \ -skipPackagePluginValidation \ - ONLY_ACTIVE_ARCH=YES \ 2>&1 | xcbeautify --renderer github-actions --preserve-unbeautified env: OPENSWIFTUI_COMPATIBILITY_TEST: 1 diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 8f2add6dc..4d2c7105a 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -92,31 +92,25 @@ jobs: run: | set -o pipefail source Scripts/Tuist/common.sh - # Keep the iOS 18.5 test runner on x86_64 until the arm64 launch path - # is validated with Xcode 26.6. Build the matching simulator slice. NSUnbufferedIO=YES tuist_xcodebuild "$BUILD_RESULT_BUNDLE_PATH" build \ -scheme OpenSwiftUI \ -configuration Debug \ - -destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }},arch=x86_64" \ + -destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \ -derivedDataPath "$DERIVED_DATA_PATH" \ -skipMacroValidation \ -skipPackagePluginValidation \ - ONLY_ACTIVE_ARCH=YES \ 2>&1 | xcbeautify --renderer github-actions --preserve-unbeautified - name: Run test target in debug mode run: | set -o pipefail source Scripts/Tuist/common.sh - # See the build step above: force x86_64 to avoid the arm64 package - # test runner launch/codesigning failure seen on the previous toolchain. NSUnbufferedIO=YES tuist_xcodebuild "$TEST_RESULT_BUNDLE_PATH" test \ -scheme OpenSwiftUI \ -configuration Debug \ - -destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }},arch=x86_64" \ + -destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \ -derivedDataPath "$DERIVED_DATA_PATH" \ -skipMacroValidation \ -skipPackagePluginValidation \ - ONLY_ACTIVE_ARCH=YES \ 2>&1 | xcbeautify --renderer github-actions --preserve-unbeautified - name: Clean up isolated DerivedData if: always() diff --git a/Docs/Toolchain/CHANGELOG.md b/Docs/Toolchain/CHANGELOG.md index 326bfa90f..45e5d3f4b 100644 --- a/Docs/Toolchain/CHANGELOG.md +++ b/Docs/Toolchain/CHANGELOG.md @@ -71,11 +71,6 @@ toolchain bump: - Remove compiler-version guards that are redundant once the package requires Swift 6.3. -Keep the iOS 18.5 test runner on x86_64 until the arm64 launch path is -separately validated with Xcode 26.6. This workaround addresses the simulator -runner launch failure seen with the previous toolchain and is not removed by -this bump without runtime evidence. - ### SDK-Linked Test Expectations Xcode 26.6 ships an `xctest` binary linked against SDK 26.4: From 50f58cd559798bb65568399a65281ab9b8064c8e Mon Sep 17 00:00:00 2001 From: Kyle Date: Sun, 16 Aug 2026 00:33:55 +0800 Subject: [PATCH 6/8] Update merged dependency revisions --- Package.resolved | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Package.resolved b/Package.resolved index 1c6392c7d..46a5150d3 100644 --- a/Package.resolved +++ b/Package.resolved @@ -7,7 +7,7 @@ "location" : "https://github.com/OpenSwiftUIProject/DarwinPrivateFrameworks.git", "state" : { "branch" : "main", - "revision" : "d93839821ebebdab22081fbc0f3d0b8cb0e30b2f" + "revision" : "b7e6ba165f3763dd477f55cc55b4a63f51385571" } }, { @@ -16,7 +16,7 @@ "location" : "https://github.com/OpenSwiftUIProject/OpenAttributeGraph", "state" : { "branch" : "main", - "revision" : "49a40098fc0b41c6f9e686ef4218b4895fe513f9" + "revision" : "65e7cbf19c2c2797d3c5eaafcb19190130c8ad47" } }, { From e89fd9b720dce412f8bf2c3aa37708f12ef109a0 Mon Sep 17 00:00:00 2001 From: Kyle Date: Sun, 16 Aug 2026 01:20:50 +0800 Subject: [PATCH 7/8] Restore required Xcode 26.6 CI workarounds --- .github/workflows/compatibility_tests.yml | 10 +++++-- .github/workflows/ios.yml | 6 ++-- .github/workflows/macos.yml | 2 ++ Docs/Toolchain/CHANGELOG.md | 36 +++++++++++++---------- Renderer/Stdout/run-example.sh | 6 +++- 5 files changed, 40 insertions(+), 20 deletions(-) diff --git a/.github/workflows/compatibility_tests.yml b/.github/workflows/compatibility_tests.yml index 26d683973..d65f1680b 100644 --- a/.github/workflows/compatibility_tests.yml +++ b/.github/workflows/compatibility_tests.yml @@ -57,7 +57,9 @@ jobs: - name: Run compatibility tests on OpenSwiftUI + macOS run: | set -o pipefail + # Swift 6.3.3 still crashes while indexing AppKit with the private framework shims. NSUnbufferedIO=YES swift test \ + --disable-index-store \ --filter OpenSwiftUICompatibilityTests \ --build-path .build-compatibility-test-debug \ 2>&1 | xcbeautify --renderer github-actions --preserve-unbeautified @@ -66,7 +68,9 @@ jobs: - name: Run compatibility tests on SwiftUI + macOS run: | set -o pipefail + # Swift 6.3.3 still crashes while indexing AppKit with the private framework shims. NSUnbufferedIO=YES swift test \ + --disable-index-store \ --filter OpenSwiftUICompatibilityTests \ --build-path .build-compatibility-test-debug \ 2>&1 | xcbeautify --renderer github-actions --preserve-unbeautified @@ -140,7 +144,8 @@ jobs: run: | set -o pipefail source Scripts/Tuist/common.sh - NSUnbufferedIO=YES tuist_xcodebuild "$OPENSWIFTUI_RESULT_BUNDLE_PATH" test \ + # Xcode 26.6 can otherwise link the host macro object into the iOS Simulator test bundle. + NSUnbufferedIO=YES tuist_xcodebuild "$OPENSWIFTUI_RESULT_BUNDLE_PATH" test -IDEPackageEnablePrebuilts=NO \ -scheme OpenSwiftUI \ -configuration Debug \ -destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \ @@ -155,7 +160,8 @@ jobs: run: | set -o pipefail source Scripts/Tuist/common.sh - NSUnbufferedIO=YES tuist_xcodebuild "$SWIFTUI_RESULT_BUNDLE_PATH" test \ + # Match the package prebuilt setting used by the OpenSwiftUI compatibility test. + NSUnbufferedIO=YES tuist_xcodebuild "$SWIFTUI_RESULT_BUNDLE_PATH" test -IDEPackageEnablePrebuilts=NO \ -scheme OpenSwiftUI \ -configuration Debug \ -destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \ diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 4d2c7105a..fb6b6c210 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -92,7 +92,8 @@ jobs: run: | set -o pipefail source Scripts/Tuist/common.sh - NSUnbufferedIO=YES tuist_xcodebuild "$BUILD_RESULT_BUNDLE_PATH" build \ + # Xcode 26.6 can otherwise link the host macro object into the iOS Simulator test bundle. + NSUnbufferedIO=YES tuist_xcodebuild "$BUILD_RESULT_BUNDLE_PATH" build -IDEPackageEnablePrebuilts=NO \ -scheme OpenSwiftUI \ -configuration Debug \ -destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \ @@ -104,7 +105,8 @@ jobs: run: | set -o pipefail source Scripts/Tuist/common.sh - NSUnbufferedIO=YES tuist_xcodebuild "$TEST_RESULT_BUNDLE_PATH" test \ + # Match the package prebuilt setting used by the build step. + NSUnbufferedIO=YES tuist_xcodebuild "$TEST_RESULT_BUNDLE_PATH" test -IDEPackageEnablePrebuilts=NO \ -scheme OpenSwiftUI \ -configuration Debug \ -destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \ diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index e35690bc4..22c4455d2 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -56,7 +56,9 @@ jobs: - name: Build and run tests in debug mode with coverage run: | set -o pipefail + # Swift 6.3.3 still crashes while indexing AppKit with the private framework shims. NSUnbufferedIO=YES swift test \ + --disable-index-store \ -c debug \ --filter OpenSwiftUITests \ --filter OpenSwiftUICoreTests \ diff --git a/Docs/Toolchain/CHANGELOG.md b/Docs/Toolchain/CHANGELOG.md index 45e5d3f4b..e98641bd8 100644 --- a/Docs/Toolchain/CHANGELOG.md +++ b/Docs/Toolchain/CHANGELOG.md @@ -5,7 +5,7 @@ found while validating CI, package dependencies, and platform-specific tests. | Date | OpenSwiftUI PR | Toolchain move | Notes | | --- | --- | --- | --- | -| 2026-07-27 | [#987](https://github.com/OpenSwiftUIProject/OpenSwiftUI/pull/987) | Xcode 26.3 / Swift 6.2.4 to Xcode 26.6 / Swift 6.3.3 | Updated package manifests and CI, removed Swift 6.2 index-store and package-prebuilt workarounds, and refreshed SDK-linked test expectations. | +| 2026-07-27 | [#987](https://github.com/OpenSwiftUIProject/OpenSwiftUI/pull/987) | Xcode 26.3 / Swift 6.2.4 to Xcode 26.6 / Swift 6.3.3 | Updated package manifests and CI, retained the targeted index-store and package-prebuilt workarounds required by Xcode 26.6, and refreshed SDK-linked test expectations. | | 2026-06-09 | [#902](https://github.com/OpenSwiftUIProject/OpenSwiftUI/pull/902) | Add Xcode 27 / SDK 27 support | Added SDK 26/27 addition guards and updated UIFoundation shims while keeping Xcode 26.3 / macOS 26.2 compatibility. | | 2026-06-07 | [#899](https://github.com/OpenSwiftUIProject/OpenSwiftUI/pull/899) | Xcode 16.4 / Swift 6.1 to Xcode 26.3 / Swift 6.2.4 | Kept `macos-15` and iOS 18.5 while documenting the Linux compiler crash, index store, prebuilt package, runtime issue, and Linux dyld shim workarounds. | | 2025-11-18 | [#634](https://github.com/OpenSwiftUIProject/OpenSwiftUI/pull/634) | Initial Xcode 26 SDK support | Added SDK 26 compatibility without moving CI to iOS 26 or macOS 26 destinations. | @@ -56,20 +56,26 @@ Update the root and nested package entry points together: The corresponding DarwinPrivateFrameworks, OpenAttributeGraph, and OpenRenderBox manifests also move to Swift tools version 6.3. -### Removed Swift 6.2 Workarounds - -Swift 6.3 no longer needs the following workarounds introduced by the previous -toolchain bump: - -- Remove `--disable-index-store` from OpenAttributeGraph SwiftPM test jobs. -- Remove `COMPILER_INDEX_STORE_ENABLE=NO` from OpenAttributeGraph Xcode and - Tuist configurations. -- Remove `--disable-index-store` from OpenSwiftUI documentation and Stdout - renderer tooling. -- Remove `--disable-experimental-prebuilts` from OpenSwiftUI SwiftPM jobs. -- Remove `-IDEPackageEnablePrebuilts=NO` from OpenSwiftUI Xcode jobs. -- Remove compiler-version guards that are redundant once the package requires - Swift 6.3. +### Swift 6.2 Workaround Audit + +Xcode 26.6 and Swift 6.3.3 make several workarounds from the previous toolchain +bump unnecessary, while CI validation shows that two targeted workarounds are +still required: + +- Retain `--disable-index-store` in OpenSwiftUI macOS SwiftPM test jobs and the + Stdout renderer because Swift 6.3.3 still crashes while indexing AppKit with + the private framework shims. +- Retain `-IDEPackageEnablePrebuilts=NO` in OpenSwiftUI iOS package build and + test jobs because Xcode 26.6 otherwise links the host macOS macro object into + the iOS Simulator test bundle. +- Remove `--disable-index-store` and `COMPILER_INDEX_STORE_ENABLE=NO` from + OpenAttributeGraph test and Tuist configurations. +- Remove the documentation-specific OpenSwiftUI index-store configuration and + the package-prebuilt override from the UI test action. +- Remove `--disable-experimental-prebuilts` from OpenSwiftUI SwiftPM jobs and + remove compiler-version guards made redundant by the Swift 6.3 requirement. +- Use the default iOS Simulator architecture rather than forcing `x86_64` and + `ONLY_ACTIVE_ARCH=YES`. ### SDK-Linked Test Expectations diff --git a/Renderer/Stdout/run-example.sh b/Renderer/Stdout/run-example.sh index 181fc85bc..699319056 100755 --- a/Renderer/Stdout/run-example.sh +++ b/Renderer/Stdout/run-example.sh @@ -4,10 +4,14 @@ set -euo pipefail cd "$(dirname "${BASH_SOURCE[0]}")" +swift_run_options=() + case "$(uname -s)" in Darwin) export OPENSWIFTUI_OPENATTRIBUTESHIMS_ATTRIBUTEGRAPH="${OPENSWIFTUI_OPENATTRIBUTESHIMS_ATTRIBUTEGRAPH:-1}" export OPENSWIFTUI_OPENATTRIBUTESHIMS_COMPUTE="${OPENSWIFTUI_OPENATTRIBUTESHIMS_COMPUTE:-0}" + # Swift 6.3.3 still crashes while indexing AppKit with the local private framework shims. + swift_run_options+=(--disable-index-store) ;; *) export OPENSWIFTUI_OPENATTRIBUTESHIMS_ATTRIBUTEGRAPH="${OPENSWIFTUI_OPENATTRIBUTESHIMS_ATTRIBUTEGRAPH:-0}" @@ -16,4 +20,4 @@ Darwin) ;; esac -exec swift run ExampleApp "$@" +exec swift run "${swift_run_options[@]}" ExampleApp "$@" From ee17732af8886d43db1f01e9f4e805101c621a29 Mon Sep 17 00:00:00 2001 From: Kyle Date: Sun, 16 Aug 2026 02:50:42 +0800 Subject: [PATCH 8/8] Fix Xcode 26.6 test compatibility --- Docs/Toolchain/CHANGELOG.md | 13 +++++++++++-- .../Layout/Geometry/LayoutTraitsTests.swift | 12 +++++++++++- .../Semantic/SemanticsTests.swift | 16 ++++++++++++++-- 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/Docs/Toolchain/CHANGELOG.md b/Docs/Toolchain/CHANGELOG.md index e98641bd8..9bae44382 100644 --- a/Docs/Toolchain/CHANGELOG.md +++ b/Docs/Toolchain/CHANGELOG.md @@ -90,8 +90,17 @@ Update the dyld shim constants and tests accordingly: - Add iOS and macOS 26.4 and 26.5 version constants. - Expect `dyld_program_sdk_at_least(26.5)` to be `false`. - Expect `dyld_program_sdk_at_least(26.4)` to be `true`. -- Update semantic linked-on-or-after expectations so the 2025 semantic version - is enabled for SDK 26.4. +- Enable the 2025 semantic version on 26.x runtimes while keeping it disabled + on the macOS 15 and iOS 18.5 CI runtimes, whose dyld does not recognize the + 2025 version-set token even though active-platform SDK checks report 26.4. + +### Swift Testing Exit-Test Arguments + +Swift Testing serializes values captured by exit-test closures as JSON, which +cannot represent non-finite floating-point values: + +- Capture dimension inputs as codable floating-point bit patterns and + reconstruct their `CGFloat` values inside the exit-test process. ### Validation diff --git a/Tests/OpenSwiftUICoreTests/Layout/Geometry/LayoutTraitsTests.swift b/Tests/OpenSwiftUICoreTests/Layout/Geometry/LayoutTraitsTests.swift index c1fc6fef9..8620f6486 100644 --- a/Tests/OpenSwiftUICoreTests/Layout/Geometry/LayoutTraitsTests.swift +++ b/Tests/OpenSwiftUICoreTests/Layout/Geometry/LayoutTraitsTests.swift @@ -87,7 +87,17 @@ struct LayoutTraitsTests { func exitTest(_ min: CGFloat, _ ideal: CGFloat, _ max: CGFloat, _ expectedFailure: Bool) async { if expectedFailure { #if !os(iOS) && !os(visionOS) - await #expect(processExitsWith: .failure) { [min, ideal, max] in + // Work around https://github.com/swiftlang/swift-testing/issues/1836: + // exit tests cannot JSON-encode captured non-finite floating-point values. + await #expect(processExitsWith: .failure) { + [ + minBitPattern = Double(min).bitPattern as UInt64, + idealBitPattern = Double(ideal).bitPattern as UInt64, + maxBitPattern = Double(max).bitPattern as UInt64, + ] in + let min = CGFloat(Double(bitPattern: minBitPattern)) + let ideal = CGFloat(Double(bitPattern: idealBitPattern)) + let max = CGFloat(Double(bitPattern: maxBitPattern)) _ = Dimension(min: min, ideal: ideal, max: max) var d = Dimension.fixed(.zero) d.max = ideal diff --git a/Tests/OpenSwiftUICoreTests/Semantic/SemanticsTests.swift b/Tests/OpenSwiftUICoreTests/Semantic/SemanticsTests.swift index bf31ed5a9..79238b586 100644 --- a/Tests/OpenSwiftUICoreTests/Semantic/SemanticsTests.swift +++ b/Tests/OpenSwiftUICoreTests/Semantic/SemanticsTests.swift @@ -93,7 +93,13 @@ struct SemanticsTests { #expect(isLinkedOnOrAfter(.v4) == true) #expect(isLinkedOnOrAfter(.v5) == true) #expect(isLinkedOnOrAfter(.v6) == true) - #expect(isLinkedOnOrAfter(.v7) == true) + // FIXME: Temporary compatibility for Xcode 26.6 CI running on macOS 15 and iOS 18.5. + let v7LinkedOnOrAfter = if #available(iOS 26.0, visionOS 26.0, *) { + true + } else { + false + } + #expect(isLinkedOnOrAfter(.v7) == v7LinkedOnOrAfter) #expect(isDeployedOnOrAfter(.v1) == true) #if arch(arm64) #expect(isDeployedOnOrAfter(.v2) == true) @@ -153,7 +159,13 @@ struct SemanticsTests { #expect(isLinkedOnOrAfter(.v4) == true) #expect(isLinkedOnOrAfter(.v5) == true) #expect(isLinkedOnOrAfter(.v6) == true) - #expect(isLinkedOnOrAfter(.v7) == true) + // FIXME: Temporary compatibility for Xcode 26.6 CI running on macOS 15. + let v7LinkedOnOrAfter = if #available(macOS 26.0, *) { + true + } else { + false + } + #expect(isLinkedOnOrAfter(.v7) == v7LinkedOnOrAfter) #expect(isDeployedOnOrAfter(.v1) == true) #expect(isDeployedOnOrAfter(.v2) == true) #expect(isDeployedOnOrAfter(.v3) == true)