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

Rajat Soni rajat.tcp at gmail.com
Sun Mar 24 20:33:24 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.
>
>> Either way I feel this is out of scope for a single student to 
>> complete in a single summer.
>
> I'm thinking it's very ambitious too.
>
>> 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.

This can be helpful ->

Source :- 
https://stackoverflow.com/questions/3061654/what-is-the-difference-between-javac-and-the-eclipse-compiler


Eclipse has implemented its own compiler called as Eclipse 
Compiler for Java (ECJ).

It is different from the javac, the compiler that is shipped with 
Sun JDK. One notable difference is that the Eclipse compiler lets 
you run code that didn't actually properly compile. If the block 
of code with the error is never ran, your program will run fine. 
Otherwise, it will throw an exception indicating that you tried 
to run code that doesn't compile.

Another difference is that the Eclipse compiler allows for 
incremental builds from within the Eclipse IDE, that is, all code 
is compiled as soon as you finish typing.

The fact that Eclipse comes with its own compiler is also 
apparent because you can write, compile, and run Java code in 
Eclipse without even installing the Java SDK.



More information about the Digitalmars-d mailing list