[gsoc] D Language Server protocol based on the DMD frontend

Rubn where at is.this
Sat Mar 16 22:14:26 UTC 2019


On Saturday, 16 March 2019 at 15:24:00 UTC, Jacob Carlborg wrote:
> On 2019-03-14 23:34, Rubn wrote:
>
>> Which part? Point is using DMD as a language server isn't 
>> going to be intuitive, compilers are designed to fail on 
>> invalid input but editors need to work for incomplete source 
>> files.
>
> Then DMD needs to be changed to handle incomplete source files. 
> I'm no expert on this topic but wouldn't it be enough if the 
> lexer and parser can handle incomplete source files? That might 
> be feasible to complete during a summer.

No it shouldn't, it's a compiler it should compile. Trying to 
shoehorn in features so it makes for a better library to be used 
as a language server will just make it a worse compiler.

>> Thinking that most of the work is done because they can use 
>> DMD is just backwards and haven't ever written tooling tools.
>
> Yes. There's no magic to use DMD as a library. Just compile all 
> the necessary files and create a library out of the object 
> files. It's been possible to do this for as long as DMD has 
> existed. We just created a Dub package and some utility 
> functions to package it nicely.

I wasn't talking about how difficult it is to compile DMD..



More information about the Digitalmars-d mailing list