-
Notifications
You must be signed in to change notification settings - Fork 120
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
[Self-Filed] Could we also support Swift? #1
Comments
Is there any progress? |
Hey, @yrom! Nope, since you're the first to express interest here. Let me check in on the Apple project. Looks like the Apple project (linked above) is still listed as early development, but is also now bundled in Xcode and has a fairly popular, highly rated vscode extension. So maybe a good time to explore. And there's no harm to supporting it early. I probably shouldn't just build this myself right now only because there's too much else going on. (Need to focus on the startup I'm running, and we don't currently use Swift.) But I'd be delighted to help if you'd be interested in adding this, especially since you just submitted a great pr :) I think integrating it into this tool would be be the way to go, much better and easier than doing separately. A high level sketch of what I'd imagine could be a good way of doing it:
-CS |
Hi, @cpsauer I have done some work to extend command-extractor for apple project based on Sourcekit-lsp. It works well on swift and objective-c project using swift plugin in vscode(conflicted with clangd plugin). But the approach needs create and run a bsp(Build server protocol) server to provider compile commands to it. Do you think it should be just another fork for apple or a pull request to the command extractor? |
Thanks for chiming in :) I think we should collaborate to merge it if we can! Much better to have a cross platform tool. But I'd like to understand a little bit more.
Thanks! |
Hi Chris, How well does sourcekit-lsp work? Do things work well, like clangd? Could you tell me more about this BSP server? Can sourcekit-lsp not just take in a compile_commands.json?
I have pushed my fork and created a sample project (https://github.com/xinzhengzhang/bazel-compile-commands-extractor/blob/feature/swift-commands/examples/ios/README.md)
|
Sweet! Thanks for all your good work. I need to head to bed now (it's super late my time), but I'll come back to this. Re compile_commands.json, you're sure? I thought I saw references to watching compile_commands.json in the code for sourckit-lsp, and I see some references in the Q&A. Obviously I'm eager to simplify/not run a server if we don't have to, but I know you've played around with this much more than I have and probably had good reason to spend time writing the server :) Where does supplying a compile_commands.json fall short? Anyway, once we've got the question of the simplest overall approach resolved, let's unify implementations! :) Ideally we'd make this work automatically for people (i.e. automatically generating swift entries if they're compiling swift code) and sharing almost all of the implementation between the languages. |
I didn't noticed that there is another branch to CompilationDatabaseBuildSystem and went to investigate Fortunately, it didn't waste too much time on the service because it is just a forwarding of compilation commands. The server part has been removed in my branch |
Oh yay! That simplifies things greatly. Could I ask you to reunify the extractor implementations, and then PR it up so we can merge in? Looks like the two of you guys might work together at bilibili? Feel free to submit incremental patches, if that's faster and easier. Happy to help if things get stuck. |
Definitely. Sorry for being a bit slow, @xinzhengzhang. Took a quick break for thanksgiving and am scrambling to catch back up. Reading now! Will continue discussion over on #89 And again, thank you! |
Is there any intent/interest to still integrate this? |
Status: There's an Apple project to (basically) add Swift support to clangd here. It doesn't look mature enough yet (2/2021), but perhaps it will be by the time we'd need it.
Suggested Workaround: Use Tulsi for now.
(Hedron Friendly Faces should use our internal XcodeAdapter wrapper for Tulsi)
The text was updated successfully, but these errors were encountered: