5 ms·
So, just because there seems to be confusion: Clangd already exists. It already supports LSP. It is already part of the llvm project. It was written by !App
by DannyBee 9y ago
So, just because there seems to be confusion:
Clangd already exists. It already supports LSP. It is already part of the llvm project. It was written by !Apple, and used by a wide number of people.
(I want to make sure these people still get credit, i already see people in this thread thanking apple for supporting LSP, which is not actually what happened).
What apple has proposed contributing is: Making clangd work with xcode, and extensions to LSP.
This is great (as long as the second ends up standardized over time).
But the benefits people listed here so far already exist in clangd. The main benefit to work is "xcode support" and "better refactoring" which is awesome :)
- falanjito 9y agoWould it make sense to rewrite everything in Python to gain some speed?
- tbodt 9y agoNo.
- oflannabhra 9y agoThe proposal is to split the LSP implementation into a transport layer and a logical layer. The current LSP implementation is directly tied to JSON-RPC. Apple's end goal is, as you say, to get clangd to work with Xcode. However, having a replaceable transport layer for LSP could benefit lots of people other than Apple.
- DannyBee 9y agoSure, it's nice, but again, being pragmatic, nobody else has desired such a thing that much. Ie so far the "lots of people" have not materialized, even outside clangd. I can certainly think of use cases for such a thing, but most people seem happy enough with json-rpc at the moment. Part of that is likely that trying to speak LSP over a non local connection may be a fools errand anyway. It's a chatty protocol no matter what the transport.
- oflannabhra 9y agoJust because Apple is the first doesn't mean there won't be others. Maybe others have not materialized because the upfront cost of updating clangd was judged too high. JSON-RPC has several alternatives that very large software companies have vested interests in: gRPC and XPC. You seem more knowledgeable of these technologies than I am, though. It just seems to me a good thing that 1) Apple, and consequently, all iOS and macOS developers will be using clangd, and 2) Apple is putting significant effort into improving clangd. I'm not sure why any of that news or optimism needs to be quenched.
- DannyBee 9y agoMy point was precisely that plenty of languages have LSP implementations at this point, an f even in those, nobody has cared much to try to find an alternative to json rpc. As for 2, all I'll say is based on history in llvm projects, I'm not anywhere near as optimistic as you. The history here is simply not one of all great things. The PR is, but the reality is much more mixed (some really great things, some really not so great). So while I certainly am hopeful, it's definitely not the unbridled optimism everyone displays here.
- kenferry 9y agoYou don't think apple's support of llvm and clang has been important to the project? That's REALLY pushing it.
- DannyBee 9y agoThat's not what i said at all. I said some things have been really great, some really not so great. This isn't even a controversial view among long-time llvmers. Heck, last time i asked him (a few months ago), even Chris Lattner agreed with my view, and he used to run his stuff at Apple, so i don't think it's unreasonable. I think it's perfectly okay to be cautiously optimistic instead of fawningly happy. Do you actually have data or a real argument you'd like to use to suggest otherwise (IE that it's been all overwhelmingly positive?)