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 asynchronous requests #759

Closed
Mx-Iris opened this issue Jan 27, 2023 · 2 comments · Fixed by #762
Closed

SourceKit asynchronous requests #759

Mx-Iris opened this issue Jan 27, 2023 · 2 comments · Fixed by #762

Comments

@Mx-Iris
Copy link

Mx-Iris commented Jan 27, 2023

Why isn't there an interface for asynchronous requests? I looked around and the SourceKit function does exist, but it doesn't call callbacks when I actually use it.

@jpsim
Copy link
Owner

jpsim commented Jan 30, 2023

Does this work for you? https://github.com/jpsim/SourceKitten/compare/jp-async-send

Sample usage:

let request = SourceKittenFramework.Request.compilerVersion
print(toJSON(toNSDictionary(try await request.asyncSend())))

@Mx-Iris
Copy link
Author

Mx-Iris commented Jan 31, 2023

Does this work for you? https://github.com/jpsim/SourceKitten/compare/jp-async-send

Sample usage:

let request = SourceKittenFramework.Request.compilerVersion
print(toJSON(toNSDictionary(try await request.asyncSend())))

Yes, it is working and much faster, please consider merging into the main branch, thanks!
You can close the issue

@jpsim jpsim linked a pull request Feb 20, 2023 that will close this issue
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