-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.triage neededThis issue needs more specific labelsThis issue needs more specific labels
Description
Description
Compiling the attached minimal project crashes the compiler with a DESERIALIZATION FAILURE
"While finishing conformance for protocol conformance to 'PersistentModel' (in module 'SwiftData')"
The app project references the initializer of a model object in a framework module at the point of failure.
If the model object is moved into the app project the compilation succeeds.
App Module
struct PreviewData {
static func load() {
let collection = GameCollection()
}
}Framework Module
@Model
public final class GameCollection {
public var name: String
public init() {}
}Steps to reproduce
Build the project in Xcode or from the command line.
Environment
swiftc --version
swift-driver version: 1.87.1 Apple Swift version 5.9 (swiftlang-5.9.0.128.2 clang-1500.0.40.1)
Target: arm64-apple-macosx14.0
xcodebuild -version
Xcode 15.0
Build version 15A5219j
cianiandreadev, MichaelDanielTom and eclair4151
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.triage neededThis issue needs more specific labelsThis issue needs more specific labels