Love seeing so much interaction in the Swift Forums!
I'm going to summarize the discussion:
Potential Workarounds:
Add @preconcurrency to the Equatable Protocol:
One potential solution discussed is adding @preconcurrency to the Equatable protocol. This would suggest that we are confident Apple will improve this in the future. However, this information hasn’t been officially communicated in the forums. @DTS Engineer isn't it?
Using MainActor.assumeIsolated:
Another approach mentioned is using MainActor.assumeIsolated as described in Swift documentation .
This works under the assumption that Equatable will only be used from the MainActor. While this might work in some cases, it could lead to issues such as the program stopping if the assumption is incorrect.
It seems like a good solution but not ideal practice, even, in this case won't stop the program.
Additionally, some forum members pointed out that using the Equatable protocol with views might not be possible.
There is also a feature request (FB15753655) proposing the creation of a custom Equatable protocol specifically for views that use @MainActor