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/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 e97e2b902..d65f1680b 100644 --- a/.github/workflows/compatibility_tests.yml +++ b/.github/workflows/compatibility_tests.yml @@ -29,12 +29,11 @@ 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: - - 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 @@ -58,10 +57,8 @@ 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. + # Swift 6.3.3 still 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 \ @@ -71,10 +68,8 @@ 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. + # Swift 6.3.3 still 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 \ @@ -90,16 +85,15 @@ jobs: fail-fast: false matrix: os: [macos-15] - xcode-version: ["26.3"] + xcode-version: ["26.6"] release: [2024] ios-version: ["18.5"] 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 @@ -150,19 +144,15 @@ 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. + # 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 }},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 @@ -170,18 +160,15 @@ 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. + # 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 }},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/documentation.yml b/.github/workflows/documentation.yml index 9c8e6ce14..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 @@ -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..fb6b6c210 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -32,16 +32,15 @@ jobs: fail-fast: false matrix: os: [macos-15] - xcode-version: ["26.3"] + xcode-version: ["26.6"] release: [2024] ios-version: ["18.5"] 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 @@ -93,34 +92,27 @@ 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. + # 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 }},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 on this Xcode/iOS pair. + # 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 }},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/.github/workflows/macos.yml b/.github/workflows/macos.yml index 0e14ef396..22c4455d2 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -25,12 +25,11 @@ 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: - - 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 @@ -57,10 +56,8 @@ 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. + # Swift 6.3.3 still crashes while indexing AppKit with the private framework shims. NSUnbufferedIO=YES swift test \ - --disable-experimental-prebuilts \ --disable-index-store \ -c debug \ --filter OpenSwiftUITests \ 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 456aa0a1a..ff57320bd 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: @@ -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/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..b82de7834 100644 --- a/.github/workflows/uitests.yml +++ b/.github/workflows/uitests.yml @@ -271,17 +271,16 @@ 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) }} 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 }} @@ -370,13 +369,12 @@ 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 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 }} 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/Docs/Toolchain/CHANGELOG.md b/Docs/Toolchain/CHANGELOG.md index fcd8d065f..9bae44382 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, 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. | @@ -12,6 +13,106 @@ 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. + +### 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 + +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`. +- 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 + +- 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) 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.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" } }, { 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..699319056 100755 --- a/Renderer/Stdout/run-example.sh +++ b/Renderer/Stdout/run-example.sh @@ -10,7 +10,7 @@ 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 6.3.3 still crashes while indexing AppKit with the local private framework shims. swift_run_options+=(--disable-index-store) ;; *) 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..8620f6486 100644 --- a/Tests/OpenSwiftUICoreTests/Layout/Geometry/LayoutTraitsTests.swift +++ b/Tests/OpenSwiftUICoreTests/Layout/Geometry/LayoutTraitsTests.swift @@ -86,9 +86,18 @@ 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 + // 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 @@ -96,7 +105,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..79238b586 100644 --- a/Tests/OpenSwiftUICoreTests/Semantic/SemanticsTests.swift +++ b/Tests/OpenSwiftUICoreTests/Semantic/SemanticsTests.swift @@ -83,6 +83,34 @@ 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) + // 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) + #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 +149,30 @@ 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) + // 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) + #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) 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