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

[Distributed] Remove diagnostic emitting from macro, rely on compiler #73635

Merged
merged 1 commit into from
May 15, 2024

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented May 15, 2024

The macro cannot diagnose some situations, or rather, would diagnose too aggressively, because it cannot inspect the type declarations of all invokved types, and therefore we're unable to reliably report errors only when necessary.

Originally I thought we don't want to emit macro code that "may fail to compile" but we don't really have a choice.

This patch removes a manual diagnostic, and enables more correct code to properly use @resolvable protocols.

Resolves rdar://128087273

Verified

This commit was signed with the committer’s verified signature.
noirbizarre Axel H.
The macro cannot diagnose some situations, or rather, would diagnose too
aggressively, because it cannot inspect the type declarations of all
invokved types, and therefore we're unable to reliably report errors
only when necessary.

Originally I thought we don't want to emit macro code that "may fail to
compile" but we don't really have a choice.

This patch removes a manual diagnostic, and enables more correct code to
properly use @resolvable protocols.
@ktoso ktoso requested review from xedin, DougGregor and hborla May 15, 2024 07:13
@ktoso
Copy link
Contributor Author

ktoso commented May 15, 2024

@swift-ci please smoke test

@ktoso ktoso merged commit 66e3110 into swiftlang:main May 15, 2024
3 checks passed
@ktoso ktoso deleted the wip-relax-macro-diagnostics branch May 15, 2024 12:01
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.

None yet

1 participant