Files
Lyrebird/RegressionFixtures/MainActorConsumer/Package.swift
T

42 lines
1.5 KiB
Swift

// swift-tools-version: 6.0
//
// Phase 201 regression fixture — committed smoke test.
//
// Proves that a consumer building under Xcode 26's default
// `SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor` (reproduced here with
// `.swiftLanguageMode(.v6)` + the raw `-default-isolation MainActor` unsafe flag —
// `.defaultIsolation(MainActor.self)` is unavailable in this SwiftPM toolchain) can
// subclass `SynthesizerBase` and override `build()` with ZERO concurrency annotations.
//
// If `SynthesizerBase`'s `@MainActor` isolation ever regresses, this package fails to
// compile with:
// "main actor-isolated instance method 'build()' has different actor isolation
// from nonisolated overridden declaration"
//
// Build to verify: (cd RegressionFixtures/MainActorConsumer && swift build)
//
// This is a standalone SwiftPM package (not part of the root `swift test`), mirroring
// the `LiveCompile/` sub-package layout. It references the core package by relative path.
import PackageDescription
let package = Package(
name: "MainActorConsumer",
platforms: [.macOS(.v15)],
dependencies: [
.package(name: "Lyrebird", path: "../..")
],
targets: [
.executableTarget(
name: "MainActorConsumer",
dependencies: [
.product(name: "Lyrebird", package: "Lyrebird")
],
swiftSettings: [
.swiftLanguageMode(.v6),
.unsafeFlags(["-default-isolation", "MainActor"])
]
)
]
)