-
Notifications
You must be signed in to change notification settings - Fork 440
[Macros] Add executable compiler plugin support library #1359
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
e79ecb1
to
f29f3ce
Compare
swiftlang/swift#63793 |
f29f3ce
to
e275899
Compare
@swift-ci Please test |
e275899
to
f302774
Compare
@swift-ci Please test |
swiftlang/swift#63888 |
f302774
to
1561e76
Compare
swiftlang/swift#63888 |
@ahoppen Let me know if you have any concern with the |
@swift-ci Please test |
473bc7e
to
afff5aa
Compare
@swift-ci Please test |
70ec0e4
to
9f40b5c
Compare
@swift-ci Please test |
|
||
// Local function to expand a member atribute macro once we've opened up | ||
// the existential. | ||
func expandMemberAttributeMacro<Node: DeclGroupSyntax>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn’t the content of this just be a trailing closure to _openExistential
? Same below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
089cad0
to
78ef801
Compare
swiftlang/swift#63952 |
'SwiftCompilerPlugin' is a helper library to write an executable compiler plugin. Usage: import SwiftCompilerPlugin import SwiftSyntaxMacros @main struct MyPlugin: CompilerPlugin { var providingMacros: [Macro.Type] = [MyMacro.self] } struct MyMacro: ExpressionMacro { ... }
There's no reason to do so, and some how plugin test fails with: ``` dyld: lazy symbol binding failed: can't resolve symbol _swift_task_create in /Users/ec2-user/.../ExamplePlugin because dependent dylib @rpath/libswift_Concurrency.dylib could not be loaded ```
78ef801
to
01c125d
Compare
01c125d
to
69230a2
Compare
swiftlang/swift#63958 |
swiftlang/swift#63958 |
69230a2
to
4f4b873
Compare
swiftlang/swift#63958 |
This adds support for building macros as executables (see swiftlang/swift-syntax#1359). Right now, this requires adding a package dependency on swift-syntax and corresponding product dependencies to the macro itself which makes testing difficult, so `BUILD_MACROS_AS_DYLIBS` is kept as the default mode.
This adds support for building macros as executables (see swiftlang/swift-syntax#1359). Right now, this requires adding a package dependency on swift-syntax and corresponding product dependencies to the macro itself which makes testing difficult, so `BUILD_MACROS_AS_DYLIBS` is kept as the default mode.
SwiftCompilerPlugin
is a helper library to write an executable compiler plugin.Usage: