Skip to content

[Distributed] Offer fixit for import Distributed when it is required #72948

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 2 commits into from
Apr 13, 2024

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Apr 10, 2024

This generalizes some "find best place for import fixit" code and applies it to suggesting Distributed module imports.

Also, rewording the error a little bit as review follow up.

@ktoso
Copy link
Contributor Author

ktoso commented Apr 10, 2024

@swift-ci please smoke test

// @_spi imports.
if (Member->isSPI()) {
auto spiGroups = Member->getSPIGroups();
if (!spiGroups.empty()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think somebody more familiar with SPI should take a look at this because it seems like we should mention more than just the first one maybe? /cc @xymus

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I took this from what it was doing in another place that @DougGregor developed for such imports so it's probably ok enough but definitely welcome some more input!

@xedin xedin requested a review from xymus April 10, 2024 22:23
@ktoso ktoso force-pushed the wip-better-import-distributed-fixit branch from 2aac251 to 66a1be1 Compare April 11, 2024 08:17
@ktoso
Copy link
Contributor Author

ktoso commented Apr 11, 2024

@swift-ci please smoke test

@ktoso ktoso force-pushed the wip-better-import-distributed-fixit branch from 66a1be1 to 8515374 Compare April 12, 2024 02:49
@ktoso
Copy link
Contributor Author

ktoso commented Apr 12, 2024

Sigh, import Foundation broke linux test ofc. Fixed by changing to import Swift

@ktoso ktoso enabled auto-merge (squash) April 12, 2024 02:49
@ktoso
Copy link
Contributor Author

ktoso commented Apr 12, 2024

@swift-ci please smoke test

@ktoso
Copy link
Contributor Author

ktoso commented Apr 12, 2024

warning: Could not read SDKSettings.json for SDK at: / on linux

@ktoso
Copy link
Contributor Author

ktoso commented Apr 12, 2024

@swift-ci please smoke test Linux

@ktoso
Copy link
Contributor Author

ktoso commented Apr 12, 2024

@swift-ci please smoke test macOS

@ktoso
Copy link
Contributor Author

ktoso commented Apr 12, 2024

@swift-ci please smoke test Windows

@ktoso ktoso merged commit 5422954 into swiftlang:main Apr 13, 2024
@ktoso ktoso deleted the wip-better-import-distributed-fixit branch April 14, 2024 03:27
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