Skip to content

Raise minimum Swift, Xcode, and platform versions - #88

Merged
dfed merged 2 commits into
claude/2.0-2-cancel-tasks-outside-lockfrom
claude/2.0-3-raise-minimums
Nov 17, 2026
Merged

dfed merged 2 commits into
claude/2.0-2-cancel-tasks-outside-lockfrom
claude/2.0-3-raise-minimums

Conversation

@dfed

@dfed dfed commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

This starts the breaking-change series for 2.0.0.

  • Swift and Xcode:
    • Requires Swift tools 6.4.
    • CI builds on the GitHub xcode-27 runner image with Xcode 27.2, and Linux CI uses swift:6.4 containers. The xcode-27 image ships the 27.2 simulator runtimes, so CI no longer downloads platforms.
    • Swift 6.4 builds with Swift Build, so the Linux coverage steps now read $(swift build -c release --show-bin-path)/AsyncQueueTests.so: both "Check Atomic Coverage Counters" from Update coverage counters atomically and time out test jobs #95, which still writes the disassembly to .build/disassembly.txt before reading it, and the coverage export. Swift Build passes -instrprof-atomic-counter-update-all through on Linux, so the check passes.
    • The jobs keep the timeouts from Update coverage counters atomically and time out test jobs #95. The simulator jobs' longest run so far on the xcode-27 image took about 25 minutes (visionOS in run 43565550543, 25 min 13 s), half of their 50-minute timeout, and the others still take about a minute.
  • Platforms: the minimums rise to the first releases that ship Synchronization.Mutex: macOS 15, iOS 18, tvOS 18, watchOS 11, Mac Catalyst 18, and visionOS 2.
  • Tests:
    • weak var references that are never reassigned become weak let, because Swift 6.4 warns about them and CI treats warnings as errors.
    • DispatchQueueExecutor, which Cancel tasks outside of CancellableQueue's lock #87 added for the spinning CancellableQueue test, now implements enqueue(_ job: consuming ExecutorJob), which the raised minimums allow, instead of the UnownedJob form that main's deployment targets needed. It also drops its explicit asUnownedSerialExecutor() in favor of the standard library's.
  • README: the install line now reads from: "2.0.0".

Action needed: branch protection

CI jobs are now named without tool or OS versions, so later toolchain bumps won't change the names of required checks. Five of the six required checks on main change names with this PR. Update them when this PR lands:

Old required check New check
Build Xcode 26 (iOS_18,watchOS_11) Build Xcode (iOS,watchOS)
Build Xcode 26 (macOS_26,tvOS_18) Build Xcode (macOS,tvOS)
Build Xcode 26 (visionOS_2) Build Xcode (visionOS)
Swift Build Xcode 26 Swift Build Xcode
Build and Test on Linux Swift 6.2 Build and Test on Linux

"Check Markdown links" is unchanged.

Series

PR 4 of 10. It is stacked on #87.

Validation

Each commit in the series was validated on its own, on Linux with Swift 6.4.2, from a git archive copy:

  • It builds with -warnings-as-errors, and swiftformat --lint is clean.
  • The full suite passed 3 runs unpinned and 1 with the test runner pinned to one CPU.
  • The Linux job's coverage steps, run from the commit's own ci.yml under bash -e, pass, including the atomic-counter check, which fails when the flag is dropped. No line in Sources or Tests reads zero in the CI run.
  • DispatchQueueExecutor's ExecutorJob form, which this PR adopts, was rechecked: cancelTasks_actorQueue_cancelsCurrentlyExecutingAndPendingTasks, whose spinner runs on it, fails 10 of 10 runs (3 pinned to one CPU) when the first ActorQueue initializer of CancellableQueue skips registering its task, passes 10 of 10 on the real code, and passes --repetitions 100 --repeat-until fail unpinned and pinned. Earlier rounds checked the other tests against mutants the same way.
  • At the top of the series, 3 rounds of 10 concurrent full suites pinned to one CPU pass, and ThreadSanitizer reports no races in 3 runs. TSan on Linux flags Synchronization.Mutex even in trivially correct code, so the TSan runs replace Mutex with a pthread-based lock that TSan understands.

Nothing was run on Apple platforms. CI is the first run there.

Review checklist

Left for code review because no test can check them:

  • The timeout is the failure signal for hang-type regressions. The renamed jobs keep timeout-minutes; a test that hangs shows up as a job stopped after 15 minutes (50 for the simulator jobs).
  • Darwin. Nothing was built with Xcode 27.2 or run on the xcode-27 image here, including DispatchQueueExecutor's ExecutorJob form under the raised minimums and -warnings-as-errors. CI is the first run there.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HLuVQLsTNvRnyh155N25UM

@codecov

codecov Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (bc2f49d) to head (9a40bac).

Additional details and impacted files

Impacted file tree graph

@@                           Coverage Diff                            @@
##           claude/2.0-2-cancel-tasks-outside-lock       #88   +/-   ##
========================================================================
  Coverage                                  100.00%   100.00%           
========================================================================
  Files                                          12        12           
  Lines                                        1510      1509    -1     
========================================================================
- Hits                                         1510      1509    -1     
Files with missing lines Coverage Δ
Tests/AsyncQueueTests/ActorQueueTests.swift 100.00% <100.00%> (ø)
Tests/AsyncQueueTests/FIFOQueueTests.swift 100.00% <100.00%> (ø)
Tests/AsyncQueueTests/Utilities/TestHelpers.swift 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Begin a breaking-change series for 2.0.0:

- Require Swift tools version 6.4, and build and lint with Swift 6.4 on
  Linux and Xcode 27.2 on macOS.
- Raise the platform minimums to the first releases that ship the
  Synchronization module's `Mutex`: macOS 15, iOS 18, tvOS 18,
  watchOS 11, Mac Catalyst 18, and visionOS 2.

The `xcode-27` runner image ships the Xcode 27.2 simulator runtimes, so
CI no longer downloads platforms. Swift 6.4 builds with Swift Build by
default, so the Linux coverage step reads the test binary from the new
products directory. Tests declare never-reassigned weak references
with `weak let`, which Swift 6.4 otherwise warns about. The tests'
`DispatchQueueExecutor` implements the `ExecutorJob` form of
`enqueue(_:)`, which the raised minimums allow.

CI jobs and build platforms are now named without tool or OS versions
("Build Xcode (iOS,watchOS)", "Swift Build Xcode", "Build and Test on
Linux"), so that future toolchain updates do not change the names of
the checks that branch protection requires. The required checks on
`main` need to be updated once, when this change lands.

The renamed jobs keep their timeouts. The simulator jobs' longest run
so far on the `xcode-27` image took about 25 minutes, half of their
50-minute timeout, and the others still take about a minute, well
within their 15 minutes.

The Linux job's check that every coverage counter update is atomic
reads the same binary as the coverage export, `AsyncQueueTests.so`.
Swift Build passes `-instrprof-atomic-counter-update-all` through on
Linux, so the check passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HLuVQLsTNvRnyh155N25UM

dfed commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner Author

Correction: this PR's new commit, 9a40bac ("Build without SwiftPM's sandbox under CodeQL"), fixes the CodeQL Swift failure I described here. With --disable-sandbox, Analyze (swift) passes on the xcode-27 runner, as it did on #97's rebased head (70d113b).

I had said CodeQL couldn't analyze Swift 6.4 at all and that this needed a decision. That was wrong. The Bad CPU type in executable (86) error came from SwiftPM's sandbox-exec launching the package manifest under CodeQL's tracer, not from CodeQL being unable to analyze the code.


Generated by Claude Code

On the xcode-27 image, SwiftPM's sandbox-exec cannot launch the compiled
package manifest under the CodeQL tracer ("Bad CPU type in executable"),
so the Swift analysis failed every run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dfed
dfed merged commit 8773e5e into main Nov 17, 2026
12 checks passed
@dfed
dfed deleted the claude/2.0-3-raise-minimums branch November 17, 2026 02:27
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.

2 participants