Open vanvoorden opened 3 months ago
@phausler hi! would you have any ability to help triage this? would you have any ideas if this looks like something we could maybe have a fix for later this year when 6.0 is released? thanks!
This is a failure associated with key paths not observation per-se.
@slavapestov Does this look related to what landed in https://github.com/apple/swift/pull/67124? Would you have any ability to help triage this? Thanks!
@AnthonyLatsis Would you have any idea if this looks like something we might be able to have a fix for when 6.0 launches later this year? Would you have any time to help triage this? Thanks!
Hi, Rick,
I can definitely help triage this, but I am not familiar enough with the crash site to tell how challenging the problem is. @slavapestov may have a better idea:
Assertion failed: (metadata.GenericPackArguments.empty() && "We don't support packs here yet"), function operator(), file GenProto.cpp, line 4349
Reduced:
struct Foo<each T> {
let foo: Int
func test() {
let kp = \Self.foo
}
}
Yeah, keypaths don't support parameter packs yet. It would take a fair amount of work but certainly should be fixed at some point.
struct Foo<each T> {
let storage: Storage
init(foo: Int) {
self.storage = Storage(foo: foo)
}
func test() {
let _ = self.storage.test()
}
}
struct Storage {
let foo: Int
func test() {
let kp = \Self.foo
}
}
Foo<Int>(foo: 0).test()
I'm unblocked (for now) since my use case makes it possible to factor my keypath access out of the outer type (that is generic across a pack).
Description
This is a runtime crash from the 5.10 toolchain and a compiler crash from the 6.0 toolchain.
Here is the runtime crash when building from 5.10 and running on macOS 14.5:
Here is the compiler crash when building from 6.0:
Reproduction
Stack dump
Expected behavior
Observable class compiles and updates at runtime with no crash.
Environment
Xcode 15.4 macOS 14.5
Additional information
No response