ChimeHQ / LanguageClient

Language Server Protocol (LSP) client for Swift
BSD 3-Clause "New" or "Revised" License
96 stars 10 forks source link

Ignored completion handler in InitializingServer #6

Closed mchakravarty closed 1 year ago

mchakravarty commented 1 year ago

I noticed a problem with setHandlers(:completionHandler:) in the InitilizingServer. The implementation of that function ignores its completionHandler argument. As a consequence, if you attempt to use the async await variant of setHandlers(), the Swift runtime complains by reporting

SWIFT TASK CONTINUATION MISUSE: setHandlers(_:) leaked its continuation!

(I worked around this by setting the handlers in the configuration, but thought the issue is still worth reporting.)

mattmassicotte commented 1 year ago

Wow thank you so much for this report, it was definitely worth it! Should be fixed with 28cebbf.

mchakravarty commented 1 year ago

Great — thanks!