Skip to content
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

sourcekit-lsp no longer starts because ParsableCommand is not implemented properly #1023

Closed
benjiwolff opened this issue Jan 14, 2024 · 3 comments · Fixed by #1024
Closed

Comments

@benjiwolff
Copy link

In this PR the signature of the SourceKitLSP command was changed from

func run() throws

to

func run() async throws

Unfortunately, this does not result in a build error. Instead, the run function is now simply not recognized. When starting the server from the command-line exits with code 0 and simply shows the CLI manual.

@ahoppen
Copy link
Collaborator

ahoppen commented Jan 14, 2024

Tracked in Apple’s issue tracker as rdar://120976054

@benjiwolff
Copy link
Author

Unfortunately, AsyncParsableCommand does not provide a solution at the root of the command due to an issue with argument parser itself. 😅

ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this issue Jan 17, 2024
This requires a bit of a restructuring of `ToolchainRegistry` because calling `scanForToolchain` on `self` is a suspension point. Instead, we need to implement the entire toolchain discovery in the initializer itself, which really isn’t that bad anyway.

This allows us to make the `SourceKitLSP.run` function synchronous again.

Fixes apple#1023
rdar://120976054
@ahoppen
Copy link
Collaborator

ahoppen commented Jan 17, 2024

Thanks for the report, @benjiwolff. I’m fixing it in #1024

ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this issue Jan 17, 2024
This requires a bit of a restructuring of `ToolchainRegistry` because calling `scanForToolchain` on `self` is a suspension point. Instead, we need to implement the entire toolchain discovery in the initializer itself, which really isn’t that bad anyway.

This allows us to make the `SourceKitLSP.run` function synchronous again.

Fixes apple#1023
rdar://120976054
ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this issue Jan 18, 2024
This requires a bit of a restructuring of `ToolchainRegistry` because calling `scanForToolchain` on `self` is a suspension point. Instead, we need to implement the entire toolchain discovery in the initializer itself, which really isn’t that bad anyway.

This allows us to make the `SourceKitLSP.run` function synchronous again.

Fixes apple#1023
rdar://120976054
ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this issue Jan 18, 2024
This requires a bit of a restructuring of `ToolchainRegistry` because calling `scanForToolchain` on `self` is a suspension point. Instead, we need to implement the entire toolchain discovery in the initializer itself, which really isn’t that bad anyway.

This allows us to make the `SourceKitLSP.run` function synchronous again.

Fixes apple#1023
rdar://120976054
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 a pull request may close this issue.

2 participants