Unify availability annotations & introduce a script to manage them #75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Instead of spelling out availability incantations, contributors can now specify availability annotations using special comments that mention the swift-system version that will introduce the entry point:
The new script
Utilities/expand-availability.pycan then be used to augment these comments with the ABI-stable OS versions that introduced these:(The script updates these expansions every time it runs.)
When the script is run with the option
--attributes, it instead adds the availability incantation as an actual availability attribute:This can be used by package maintainers to generate the ABI stable variant of swift-system that ships in Apple's OS distributions.
The script recognizes all three forms of these annotations and updates them on every run, so we can run the script to enable/disable attributes as needed.