Skip to content

[5.9-20230510] [Macros] Improve diagnostics for missing macro implementation #65852

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

Conversation

rxwei
Copy link
Contributor

@rxwei rxwei commented May 11, 2023

Cherry-pick #65814


  • Explanation: Improve an incorrect diagnostic message that misleads people to using -load-plugin-library to load plugin libraries, whereas most developers should actually be using a Swift package dependency for a self-defined or open-source macro implementation.
  • Scope: One type checker diagnostic message
  • Risk: Low
  • Testing: Updated tests for the new diagnostic

…ang#65814)

We should no longer say "macro implementation must be provided via '-load-plugin-library'" as there are multiple ways to pick up a macro dependency. Here's an improved version:

> warning: external macro implementation type 'MissingModule.MissingType' could not be found for macro 'missingMacro1'; the type must be public and provided by a macro target in a Swift package, or via '-plugin-path' or '-load-plugin-library'
@rxwei rxwei requested a review from a team as a code owner May 11, 2023 05:02
@rxwei rxwei closed this May 11, 2023
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.

1 participant