Skip to content
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

AST/Sema: Model custom availability domains #79070

Merged
merged 6 commits into from
Feb 1, 2025

Conversation

tshortli
Copy link
Contributor

Introduce a "custom" availability domain kind and store the domain definitions defined on the command line on the ModuleDecl as custom domains.

@tshortli
Copy link
Contributor Author

@swift-ci please smoke test

@tshortli tshortli force-pushed the model-custom-availability-domains branch from 358d55a to 76828ef Compare January 31, 2025 08:10
@tshortli
Copy link
Contributor Author

@swift-ci please smoke test

2 similar comments
@tshortli
Copy link
Contributor Author

@swift-ci please smoke test

@tshortli
Copy link
Contributor Author

@swift-ci please smoke test

@tshortli
Copy link
Contributor Author

@swift-ci please smoke test macOS

@@ -201,9 +201,42 @@ void AvailabilityInference::applyInferredAvailableAttrs(
Decl *ToDecl, ArrayRef<const Decl *> InferredFromDecls) {
auto &Context = ToDecl->getASTContext();

class OrderedAvailabilityDomain {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please comment-clarify the kind of ordering and its purpose that this does?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

lib/Frontend/Frontend.cpp Outdated Show resolved Hide resolved
Availability attribute inferrence is currently the only thing that depends on
having a total ordering on AvailabilityDomains.
Store the domain definitions defined on the command line on the `ModuleDecl` for
the main module.
@tshortli tshortli force-pushed the model-custom-availability-domains branch from 76828ef to 1e76f19 Compare February 1, 2025 01:31
@tshortli
Copy link
Contributor Author

tshortli commented Feb 1, 2025

@swift-ci please smoke test

@tshortli
Copy link
Contributor Author

tshortli commented Feb 1, 2025

swiftlang/sourcekit-lsp#1962

@swift-ci please smoke test

SourceKit-LSP tests depend on the exact behavior of this diagnostic (which I
don't plan to preserve) so I'm reverting the consolidation temporarily to get
unblocked.
@tshortli
Copy link
Contributor Author

tshortli commented Feb 1, 2025

@swift-ci please smoke test

@tshortli tshortli enabled auto-merge February 1, 2025 18:08
@tshortli tshortli merged commit afd9972 into swiftlang:main Feb 1, 2025
3 checks passed
@tshortli tshortli deleted the model-custom-availability-domains branch February 2, 2025 00:03
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.

2 participants