Skip to content

[Plugin] Add 'loadPluginLibrary' message #1411

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
Mar 17, 2023

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Mar 15, 2023

Update for swiftlang/swift#64376 but can be applied independently.

This message is to load a dynamic link library from the specified path. Later on, the loaded macro should be usable just like the normal macro expansion.

Also, add features to the capability message. Plugin implementations can declare the optional features they implement. CompilerPlugin doesn't implement any optional features at this point.

Also, add SwiftCompilerPluginMessageHandling to the CMake build.

@rintaro rintaro requested a review from ahoppen as a code owner March 15, 2023 04:33
@rintaro rintaro force-pushed the plugin-dylibmacro branch 2 times, most recently from 19b43d5 to be668a7 Compare March 15, 2023 04:41
@rintaro
Copy link
Member Author

rintaro commented Mar 15, 2023

@swift-ci Please test

@rintaro rintaro force-pushed the plugin-dylibmacro branch from be668a7 to 0e6ec19 Compare March 15, 2023 20:57
@rintaro
Copy link
Member Author

rintaro commented Mar 15, 2023

@swift-ci Please test

@rintaro rintaro requested a review from bnbarham March 15, 2023 21:05
Comment on lines 16 to 18
public enum PluginFeature: String {
case loadPluginLibrary
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer PluginFeature to have specific values set so that a global rename doesn't accidentally change the protocol.

@bnbarham
Copy link
Contributor

@swift-ci please test Windows platform

This message is to load a dynamic link library from the specified path.
Later on, the loaded macro should be usable just like the normal macro
expansion.

Also, add 'features' to the capability message. Plugin implementations
can declare the optional features they implement. 'CompilerPlugin' doesn't
implement any optional features at this point.
@rintaro rintaro force-pushed the plugin-dylibmacro branch from 0e6ec19 to 6b677f7 Compare March 17, 2023 17:04
@rintaro
Copy link
Member Author

rintaro commented Mar 17, 2023

@swift-ci Please test

1 similar comment
@rintaro
Copy link
Member Author

rintaro commented Mar 17, 2023

@swift-ci Please test

@rintaro rintaro merged commit 55349f8 into swiftlang:main Mar 17, 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.

3 participants