Skip to content

[Distributed] account Distributed module use from DA declarations #81797

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

ktoso
Copy link
Contributor

@ktoso ktoso commented May 28, 2025

When issuing warnings about an import not needing to be public, we did
not account for the Distributed module MUST be imported when a
distributed actor is declared. This also actually means that a public
distributed actor effectively is a public use of the DistributedActor
protocol

resolves rdar://152129980

When issuing warnings about an import not needing to be public, we did
not account for the Distributed module MUST be imported when a
distributed actor is declared. This also actually means that a public
distributed actor effectively is a public use of the DistributedActor
protocol

resolves rdar://152129980
@ktoso ktoso requested review from hborla and xedin as code owners May 28, 2025 03:56
@ktoso
Copy link
Contributor Author

ktoso commented May 28, 2025

@swift-ci please smoke test

@ktoso ktoso requested a review from DougGregor May 28, 2025 03:56
// REQUIRES: distributed

// Should NOT produce a warning, we do use the module in a public declaration, see MyPublicDistributedActor
public import Distributed
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We wrongly issued a "Public import of 'Distributed' was not used in public declarations or inlinable code" here before

@ktoso
Copy link
Contributor Author

ktoso commented May 28, 2025

@swift-ci please test macOS

Copy link
Contributor

@xymus xymus left a comment

Choose a reason for hiding this comment

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

Looks good, thank you!

@ktoso ktoso merged commit 8b4740f into swiftlang:main May 28, 2025
3 of 4 checks passed
@ktoso ktoso deleted the wip-handle-public-import-distributed-awareness branch May 28, 2025 23:04
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