Skip to content

Commit 9f40b5c

Browse files
committed
[Plugin] Stop using 'async' for main/message handling methods
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 ```
1 parent afff5aa commit 9f40b5c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/SwiftCompilerPlugin/CompilerPlugin.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ extension CompilerPlugin {
6565

6666
/// Main entry point of the plugin — sets up a communication channel with
6767
/// the plugin host and runs the main message loop.
68-
public static func main() async throws {
68+
public static func main() throws {
6969
// Duplicate the `stdin` file descriptor, which we will then use for
7070
// receiving messages from the plugin host.
7171
let inputFD = dup(fileno(stdin))
@@ -115,7 +115,7 @@ extension CompilerPlugin {
115115
let instance = Self()
116116
do {
117117
while let message = try pluginHostConnection.waitForNextMessage() {
118-
try await instance.handleMessage(message)
118+
try instance.handleMessage(message)
119119
}
120120
} catch {
121121
// Emit a diagnostic and indicate failure to the plugin host,
@@ -137,7 +137,7 @@ extension CompilerPlugin {
137137
}
138138

139139
/// Handles a single message received from the plugin host.
140-
fileprivate func handleMessage(_ message: HostToPluginMessage) async throws {
140+
fileprivate func handleMessage(_ message: HostToPluginMessage) throws {
141141
switch message {
142142
case .getCapability:
143143
try pluginHostConnection.sendMessage(

0 commit comments

Comments
 (0)