Skip to content

[6.0][Distributed] Diagnose missing import also for funcs in extensions #72928

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
merged 3 commits into from
Apr 14, 2024

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Apr 9, 2024

Description: When a distributed func was declared in an extension in a file that did not import the Distributed module, though the extension was made properly on a distributed actor, we would crash in synthesis in SILGen because synthesis refers to types in the distributed module and the import is necessary.

This patch properly diagnoses missing imports whenever a distributed func is used somewhere.

Reviewed by: @xedin
Risk: Low, only improved diagnostics rather than crashing the compiler for distributed func declarations.
Testing: CI testing, verified manually in Xcode project of original issue reporter
Original PR: #72923 #72948
Radar: rdar://125813581 rdar://120761584

@ktoso ktoso requested a review from a team as a code owner April 9, 2024 12:10
@ktoso
Copy link
Contributor Author

ktoso commented Apr 9, 2024

@swift-ci please test

@ktoso ktoso changed the title [Distributed] Diagnose missing import also for funcs in extensions [6.0][Distributed] Diagnose missing import also for funcs in extensions Apr 9, 2024
@ktoso ktoso enabled auto-merge (squash) April 9, 2024 12:11
@ktoso ktoso disabled auto-merge April 9, 2024 12:12
@ktoso ktoso added distributed Feature → concurrency: distributed actor 🍒 release cherry pick Flag: Release branch cherry picks swift 6.0 labels Apr 9, 2024
@ktoso ktoso requested review from xedin and hborla April 9, 2024 12:43
@ktoso
Copy link
Contributor Author

ktoso commented Apr 10, 2024

@swift-ci please test

@ktoso
Copy link
Contributor Author

ktoso commented Apr 11, 2024

Cherry pick AFTER #72974 to avoid conflicts

@ktoso ktoso force-pushed the pick-wip-diagnose-missing-import branch from ec7b8f4 to a73d588 Compare April 11, 2024 08:33
@ktoso
Copy link
Contributor Author

ktoso commented Apr 11, 2024

@swift-ci please test

@ktoso ktoso force-pushed the pick-wip-diagnose-missing-import branch from a73d588 to b39e0b9 Compare April 12, 2024 03:07
@ktoso ktoso force-pushed the pick-wip-diagnose-missing-import branch from b39e0b9 to 6ad9fa3 Compare April 12, 2024 03:07
@ktoso
Copy link
Contributor Author

ktoso commented Apr 12, 2024

@swift-ci please test

@ktoso
Copy link
Contributor Author

ktoso commented Apr 12, 2024

rebased post-#72974

@ktoso
Copy link
Contributor Author

ktoso commented Apr 12, 2024

@swift-ci please test Linux

1 similar comment
@ktoso
Copy link
Contributor Author

ktoso commented Apr 12, 2024

@swift-ci please test Linux

@ktoso
Copy link
Contributor Author

ktoso commented Apr 12, 2024

@swift-ci please test

@ktoso ktoso merged commit 6d5fa1e into swiftlang:release/6.0 Apr 14, 2024
@ktoso ktoso deleted the pick-wip-diagnose-missing-import branch April 14, 2024 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distributed Feature → concurrency: distributed actor 🍒 release cherry pick Flag: Release branch cherry picks swift 6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants