You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the current point, we can not enforce that a Standard Constraint actually conforms to the Standard protocol.
Problem
We need to enforce protocol conformance for existential types at compile time or runtime.
Currently, it is possible to define a constraint without conforming it to Standard, resulting in issues with actor isolation and undefined runtime behavior or runtime crashes:
We are unaware of any possible solutions to enforce the protocol conformance on runtime or compile time.
A possible element to explore might be the usage of a macro instead of a property wrapper for the @StandardActor usage. Using a macro might give us more insights about the type and possible enforce more elements.
Code of Conduct
I agree to follow this project's Code of Conduct and Contributing Guidelines
The text was updated successfully, but these errors were encountered:
Use Case
At the current point, we can not enforce that a Standard Constraint actually conforms to the Standard protocol.
Problem
We need to enforce protocol conformance for existential types at compile time or runtime.
Currently, it is possible to define a constraint without conforming it to
Standard
, resulting in issues with actor isolation and undefined runtime behavior or runtime crashes:Solution
We have created a forum thread to ask for advice on this problem: https://forums.swift.org/t/enforcing-protocol-conformance-for-existential-types-at-compiletime-or-runtime/66215.
We are unaware of any possible solutions to enforce the protocol conformance on runtime or compile time.
A possible element to explore might be the usage of a macro instead of a property wrapper for the
@StandardActor
usage. Using a macro might give us more insights about the type and possible enforce more elements.Code of Conduct
The text was updated successfully, but these errors were encountered: