Post

Replies

Boosts

Views

Activity

Reply to Swift compiler crashes with simple SwiftData model
Exactly the same issue here, I even tried with a very simple model as below. Trying to create the below in a unit test crashes with the same output as above. Tested on Xcode 15 beta 7. @Model class TestModel { var front: String init(front: String) { self.front = front } } Then in unit tests... func testSwiftDataImplementation() throws { let schema = Schema([TestModel.self]) let config = ModelConfiguration(isStoredInMemoryOnly: true) let container = try ModelContainer(for: schema, configurations: [config]) let testModel = TestModel(front: "123") } Stack trace output very similar to above 1. Apple Swift version 5.9 (swiftlang-5.9.0.128.2 clang-1500.0.40.1) 2. Compiling with the current language version 3. While evaluating request TypeCheckSourceFileRequest(source_file "/Users/timrichardson/Documents/projects/FloorPlanner/FloorPlannerTests/FloorPlannerTests.swift") 4. While evaluating request TypeCheckFunctionBodyRequest(FloorPlannerTests.(file).FloorPlannerTests.testSwiftDataImplementation()@/Users/timrichardson/Documents/projects/FloorPlanner/FloorPlannerTests/FloorPlannerTests.swift:19:10) 5. While type-checking statement at [/Users/timrichardson/Documents/projects/FloorPlanner/FloorPlannerTests/FloorPlannerTests.swift:19:47 - line:27:5] RangeText="{ let schema = Schema([TestModel.self]) let config = ModelConfiguration(isStoredInMemoryOnly: true) let container = try ModelContainer(for: schema, configurations: [config]) let testModel = TestModel(front: "123") " 6. While type-checking declaration 0x14f009478 (at /Users/timrichardson/Documents/projects/FloorPlanner/FloorPlannerTests/FloorPlannerTests.swift:26:9) 7. While evaluating request PatternBindingEntryRequest((unknown decl), 0, 0) 8. While type-checking expression at [/Users/timrichardson/Documents/projects/FloorPlanner/FloorPlannerTests/FloorPlannerTests.swift:26:25 - line:26:47] RangeText="TestModel(front: "123"" 9. While type-checking-target starting at /Users/timrichardson/Documents/projects/FloorPlanner/FloorPlannerTests/FloorPlannerTests.swift:26:25 10. While reading from module 'FloorPlanner', builder version '5.9(5.9)/Apple Swift version 5.9 (swiftlang-5.9.0.128.2 clang-1500.0.40.1)', built from source, non-resilient, loaded from '/Users/timrichardson/Library/Developer/Xcode/DerivedData/FloorPlanner-cabknwrmxgbhkbcieyflghtkspqb/Build/Products/Debug-iphonesimulator/FloorPlanner.swiftmodule/arm64-apple-ios-simulator.swiftmodule' 11. While finishing conformance for protocol conformance to 'PersistentModel' (in module 'SwiftData') for type 'TestModel' 12. *** DESERIALIZATION FAILURE *** *** If any module named here was modified in the SDK, please delete the *** *** new swiftmodule files from the SDK and keep only swiftinterfaces. *** module 'FloorPlanner', builder version '5.9(5.9)/Apple Swift version 5.9 (swiftlang-5.9.0.128.2 clang-1500.0.40.1)', built from source, non-resilient, loaded from '/Users/timrichardson/Library/Developer/Xcode/DerivedData/FloorPlanner-cabknwrmxgbhkbcieyflghtkspqb/Build/Products/Debug-iphonesimulator/FloorPlanner.swiftmodule/arm64-apple-ios-simulator.swiftmodule' serialized conformances do not match requirement signature
Topic: App & System Services SubTopic: iCloud Tags:
Aug ’23
Reply to Swift compiler crashes with simple SwiftData model
Exactly the same issue here, I even tried with a very simple model as below. Trying to create the below in a unit test crashes with the same output as above. Tested on Xcode 15 beta 7. @Model class TestModel { var front: String init(front: String) { self.front = front } } Then in unit tests... func testSwiftDataImplementation() throws { let schema = Schema([TestModel.self]) let config = ModelConfiguration(isStoredInMemoryOnly: true) let container = try ModelContainer(for: schema, configurations: [config]) let testModel = TestModel(front: "123") } Stack trace output very similar to above 1. Apple Swift version 5.9 (swiftlang-5.9.0.128.2 clang-1500.0.40.1) 2. Compiling with the current language version 3. While evaluating request TypeCheckSourceFileRequest(source_file "/Users/timrichardson/Documents/projects/FloorPlanner/FloorPlannerTests/FloorPlannerTests.swift") 4. While evaluating request TypeCheckFunctionBodyRequest(FloorPlannerTests.(file).FloorPlannerTests.testSwiftDataImplementation()@/Users/timrichardson/Documents/projects/FloorPlanner/FloorPlannerTests/FloorPlannerTests.swift:19:10) 5. While type-checking statement at [/Users/timrichardson/Documents/projects/FloorPlanner/FloorPlannerTests/FloorPlannerTests.swift:19:47 - line:27:5] RangeText="{ let schema = Schema([TestModel.self]) let config = ModelConfiguration(isStoredInMemoryOnly: true) let container = try ModelContainer(for: schema, configurations: [config]) let testModel = TestModel(front: "123") " 6. While type-checking declaration 0x14f009478 (at /Users/timrichardson/Documents/projects/FloorPlanner/FloorPlannerTests/FloorPlannerTests.swift:26:9) 7. While evaluating request PatternBindingEntryRequest((unknown decl), 0, 0) 8. While type-checking expression at [/Users/timrichardson/Documents/projects/FloorPlanner/FloorPlannerTests/FloorPlannerTests.swift:26:25 - line:26:47] RangeText="TestModel(front: "123"" 9. While type-checking-target starting at /Users/timrichardson/Documents/projects/FloorPlanner/FloorPlannerTests/FloorPlannerTests.swift:26:25 10. While reading from module 'FloorPlanner', builder version '5.9(5.9)/Apple Swift version 5.9 (swiftlang-5.9.0.128.2 clang-1500.0.40.1)', built from source, non-resilient, loaded from '/Users/timrichardson/Library/Developer/Xcode/DerivedData/FloorPlanner-cabknwrmxgbhkbcieyflghtkspqb/Build/Products/Debug-iphonesimulator/FloorPlanner.swiftmodule/arm64-apple-ios-simulator.swiftmodule' 11. While finishing conformance for protocol conformance to 'PersistentModel' (in module 'SwiftData') for type 'TestModel' 12. *** DESERIALIZATION FAILURE *** *** If any module named here was modified in the SDK, please delete the *** *** new swiftmodule files from the SDK and keep only swiftinterfaces. *** module 'FloorPlanner', builder version '5.9(5.9)/Apple Swift version 5.9 (swiftlang-5.9.0.128.2 clang-1500.0.40.1)', built from source, non-resilient, loaded from '/Users/timrichardson/Library/Developer/Xcode/DerivedData/FloorPlanner-cabknwrmxgbhkbcieyflghtkspqb/Build/Products/Debug-iphonesimulator/FloorPlanner.swiftmodule/arm64-apple-ios-simulator.swiftmodule' serialized conformances do not match requirement signature
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Aug ’23