Skip to content

[Macros] Improve diagnostics for missing macro implementation #65814

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 1 commit into from
May 10, 2023

Conversation

rxwei
Copy link
Contributor

@rxwei rxwei commented May 9, 2023

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 review from hborla, slavapestov and xedin as code owners May 9, 2023 23:58
@rxwei
Copy link
Contributor Author

rxwei commented May 10, 2023

@swift-ci please smoke test

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 force-pushed the improve-macro-impl-missing-diag branch from d273e5b to fcc6f50 Compare May 10, 2023 05:27
@rxwei
Copy link
Contributor Author

rxwei commented May 10, 2023

@swift-ci please smoke test

@xedin xedin removed their request for review May 10, 2023 16:59
@rxwei rxwei merged commit 0f25f02 into swiftlang:main May 10, 2023
rxwei added a commit to rxwei/swift that referenced this pull request May 11, 2023
…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 added a commit to rxwei/swift that referenced this pull request May 11, 2023
…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'
nickolas-pohilets pushed a commit to nickolas-pohilets/swift that referenced this pull request May 12, 2023
…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'
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