25 lines
1.0 KiB
Bash
Executable File
25 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# check-swift6-consumer.sh
|
|
#
|
|
# Phase 201/202 guard: proves the zero-annotation consumer guarantee still holds.
|
|
#
|
|
# Builds the committed regression fixture, an SPM consumer pinned to
|
|
# `.swiftLanguageMode(.v6)` + `-default-isolation MainActor` (Xcode 26's new-project
|
|
# default), which subclasses `SynthesizerBase` and overrides `build()` with NO concurrency
|
|
# annotations. If the core's `@MainActor` isolation surface ever regresses, this fails to
|
|
# compile with:
|
|
# "main actor-isolated instance method 'build()' has different actor isolation
|
|
# from nonisolated overridden declaration"
|
|
#
|
|
# Run manually or from CI. Exit 0 = guarantee intact.
|
|
set -euo pipefail
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
|
|
echo "[1/2] Building core package under Swift 6 language mode..."
|
|
(cd "$ROOT" && swift build)
|
|
|
|
echo "[2/2] Building zero-annotation MainActor-default consumer fixture..."
|
|
(cd "$ROOT/RegressionFixtures/MainActorConsumer" && swift build)
|
|
|
|
echo "OK: Swift 6 + MainActor-default consumer compiles with zero annotations."
|