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
SR-263 Implement a general solution to prevent deadlocks when generic types rely on their own metadata recursively
Issue Description:
The goal here is to make client code resilient to changes in the internal representation of library types. In particular, we want the following changes to be resilient by default:
Adding a public or internal stored property to a struct
Removing a private or internal stored property from a struct, as long as it is not used from @transparent functions
Changing a struct stored property into a computed property, or vice versa
Adding a payload or no-payload case to an enum
Removing an internal case from an enum (not supported by Sema, but the calling convention changes are independent of that)
Adding a public or internal stored property to a class
Removing a private or internal stored property from a class, as long as it is not used from @transparent functions
Changing a class stored property into a computed property, or vice versa
Changing a global variable from a stored to computed or vice versa
To allow optimization, the @_fixed_layout attribute communicates the intent that the layout of a type is part of the interface and will not change. The layout is defined as follows:
For structs, the ordering and types of all stored properties must never change
For enums, the total set of all payload and no-payload cases must never change
Note that @_fixed_layout types can contain resiliently-typed properties or payloads, and have a dynamic size as a result.
The text was updated successfully, but these errors were encountered:
I don't think so. We're planning to add most of the support for resilience at the same time we stabilize the ABI, but otherwise, they're mostly orthogonal features. We could hypothetically freeze the ABI without any support for resilience at all (not that we would choose to do that).
Additional Detail from JIRA
md5: 71461af5f8e45929bf61f8ab976cb55c
is blocked by:
Issue Description:
The goal here is to make client code resilient to changes in the internal representation of library types. In particular, we want the following changes to be resilient by default:
Adding a public or internal stored property to a struct
Removing a private or internal stored property from a struct, as long as it is not used from @transparent functions
Changing a struct stored property into a computed property, or vice versa
Adding a payload or no-payload case to an enum
Removing an internal case from an enum (not supported by Sema, but the calling convention changes are independent of that)
Adding a public or internal stored property to a class
Removing a private or internal stored property from a class, as long as it is not used from @transparent functions
Changing a class stored property into a computed property, or vice versa
To allow optimization, the @_fixed_layout attribute communicates the intent that the layout of a type is part of the interface and will not change. The layout is defined as follows:
For structs, the ordering and types of all stored properties must never change
For enums, the total set of all payload and no-payload cases must never change
Note that @_fixed_layout types can contain resiliently-typed properties or payloads, and have a dynamic size as a result.
The text was updated successfully, but these errors were encountered: