Skip to content

[ASTGen] Adopt AvailabilityDomainOrIdentifier scheme #79821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Mar 6, 2025

Aligning with lib/Parse

@tshortli
Copy link
Contributor

tshortli commented Mar 6, 2025

In my head, ASTGen should not need to know about AvailabilityDomain or AvailabilityDomainOrIdentifier at all because parsing should always just parse an Identifier and construct AvailableAttrs and AvailabilitySpecs with that. Now that you've abstracted away creation of @_unavailableInEmbedded attributes I think it should be possible, am I missing a reason this complexity needs to be bridged to ASTGen?

@rintaro
Copy link
Member Author

rintaro commented Mar 6, 2025

I'm planning to make it simple in followups. We need AvailabilityDomainOrIdentifier in ASTGen at this point only because we need to extract Identifier from AvailabilitySpec. And we need to do that because availability macros are stored as list of AvailabilitySpec.. which is not necessary . It could be just a list of {Identifier, VersionTuple}.

@rintaro rintaro force-pushed the astgen-available-domain-or-identifier branch from 4cc36a4 to 0196629 Compare March 6, 2025 20:59
@rintaro
Copy link
Member Author

rintaro commented Mar 6, 2025

@swift-ci Please smoke test

@rintaro rintaro force-pushed the astgen-available-domain-or-identifier branch from 0196629 to 96e3aa9 Compare March 7, 2025 12:16
@rintaro
Copy link
Member Author

rintaro commented Mar 7, 2025

@swift-ci Please smoke test

@rintaro rintaro marked this pull request as ready for review March 7, 2025 12:16
@rintaro rintaro force-pushed the astgen-available-domain-or-identifier branch from 96e3aa9 to c669004 Compare March 7, 2025 15:18
@rintaro
Copy link
Member Author

rintaro commented Mar 7, 2025

@swift-ci Please smoke test

@rintaro rintaro enabled auto-merge March 7, 2025 17:13
@rintaro rintaro merged commit 30be52d into swiftlang:main Mar 7, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants