To async deinit support I need to add a new field to the DestructorLayout
. Can I insert it in the middle (after objc?
, before GenericSignatureIDField
) or it must be the last one for compatibility?
Serialization doc is confusing. It describes backward compatibility, but also, IIUC, says that currently there is not compatibility at all:
Today's Swift uses a "major" version number of 0 and an always-incrementing "minor" version number. Every change is treated as compatibility-breaking; the minor version must match exactly for the compiler to load the module.
I've tried to check few previous commits where SWIFTMODULE_VERSION_MINOR
was bumped, and I don't see any code that would be taking care of backwards compatibility. Do llvm::BitstreamCursor
and friends automatically handle backward compatibility? If so, how to they know which records are missing? Is there any control over default values? I could not find anything inside the LLVM sources myself.
Can you point me to an example of handling backwards compatibility?