www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - [GSoC] "Language Server Protocol in D" - progress and update thread

reply Manish Khurana <mkmanishkhurana98 gmail.com> writes:
Hi everyone,

I have started working on my GSoC-2019 project "Language Server 
Protocol in D". This newsgroup thread is for posting progress and 
updates about the project.

-----------------
About the project
-----------------

Language Server Protocol (LSP) is JSON-RPC based protocol for use 
between source code editors or IDEs and servers that provide 
programming language-specific features. The idea behind the LSP 
is to standardize the protocol for how tools and servers 
communicate, so a single Language Server can be re-used in 
multiple development tools, and tools can support languages with 
minimal effort.

As of now, almost every language has a language server and almost 
all editors and IDEs are either having or developing support for 
LSP. D Language also has two language servers - DLS and DCD. 
Although these two language servers work very well, but they use 
libdparse library for lexing and parsing D source code and hence 
they still lack in some of the features like semantic analysis on 
AST and D's very powerful Compile-Time Function Evaluation (CTFE).

Recent developments in DMD made it available to be used as a 
library. This means the compiler can be reused and tools don’t 
have to re-implement complex features like CTFE. This project 
aims to develop a new fully-functional language server for D 
programming language using dmd library.

More details about project and project roadmap could be found at 
https://docs.google.com/document/d/15ogvupEgfDgX5RqZOqSbO4-Hz7gWOxIONB6H46tjbIc/edit?usp=sharing


----------
This Month
----------

* Improve dmd library to be properly used as a library.
* Implement protocol specifications by re-using code from DLS or 
serve-d.
* Add linting (i.e. showing error messages) support.
* Write test for linting.


----------
Next Month
----------

* Implement completion request as per specification. Use dmd 
library to get symbols matching the provided input.
* Implement go-to definition request as per specification. Use 
dmd library to find the location of symbol definition in the 
source files.
* Write tests for completion and go-to-definition requests.


--------
Blockers
--------

So far no blockers have been encountered.
May 29 2019
next sibling parent reply Ben Jones <fake fake.fake> writes:
On Wednesday, 29 May 2019 at 10:17:43 UTC, Manish Khurana wrote:
 Hi everyone,

 I have started working on my GSoC-2019 project "Language Server 
 Protocol in D". This newsgroup thread is for posting progress 
 and updates about the project.

 [...]
Awesome to hear. Are there any examples of projects already using DMD as a library or docs somewhere on how to do so?
May 29 2019
parent Jacob Carlborg <doob me.com> writes:
On 2019-05-29 19:44, Ben Jones wrote:

 Are there any examples of projects already using DMD as a library
I have a project, DLP, using DMD as a library [1]
 or docs somewhere on how to do so?
No, not really any documentation. I think it's best to look at the existing examples and tests: Here's a simple usage [2]. Here are some slightly more advanced examples [3]. For a full application using DMD as a library, see my application, DLP [1]. [1] https://github.com/jacob-carlborg/dlp [2] https://github.com/dlang/dmd/blob/master/test/unit/self_test.d [3] https://github.com/dlang/dmd/blob/master/test/unit/frontend.d -- /Jacob Carlborg
May 29 2019
prev sibling parent reply Exil <Exil gmall.com> writes:
What's the status of this? Haven't seen any update on progress?
Jul 22 2019
parent reply Daniel Kozak <kozzi11 gmail.com> writes:
On Tue, Jul 23, 2019 at 1:45 AM Exil via Digitalmars-d <
digitalmars-d puremagic.com> wrote:

 What's the status of this? Haven't seen any update on progress?
I presume it is dead. Because it does nt seems to be there anymore (if ever): https://summerofcode.withgoogle.com/organizations/6103365956665344/
Jul 23 2019
parent reply Seb <seb wilzba.ch> writes:
On Tuesday, 23 July 2019 at 07:44:24 UTC, Daniel Kozak wrote:
 On Tue, Jul 23, 2019 at 1:45 AM Exil via Digitalmars-d < 
 digitalmars-d puremagic.com> wrote:

 What's the status of this? Haven't seen any update on progress?
I presume it is dead. Because it does nt seems to be there anymore (if ever): https://summerofcode.withgoogle.com/organizations/6103365956665344/
Yes, we sadly had to fail the student on his first evaluation as he was very inactive and his only contribution in two months (4 weeks community bonding, 4 weeks first milestone) was a single ten PR. I wanted this project to move forward too, but it's a waste of Google's and our resources if students aren't actively working. Maybe someone is interested to pick this project about for the upcoming SAoC?
Jul 23 2019
parent RazvanN <razvan.nitu1305 gmail.com> writes:
On Tuesday, 23 July 2019 at 15:06:01 UTC, Seb wrote:
 On Tuesday, 23 July 2019 at 07:44:24 UTC, Daniel Kozak wrote:
 On Tue, Jul 23, 2019 at 1:45 AM Exil via Digitalmars-d < 
 digitalmars-d puremagic.com> wrote:

 What's the status of this? Haven't seen any update on 
 progress?
I presume it is dead. Because it does nt seems to be there anymore (if ever): https://summerofcode.withgoogle.com/organizations/6103365956665344/
Yes, we sadly had to fail the student on his first evaluation as he was very inactive and his only contribution in two months (4 weeks community bonding, 4 weeks first milestone) was a single ten PR. I wanted this project to move forward too, but it's a waste of Google's and our resources if students aren't actively working. Maybe someone is interested to pick this project about for the upcoming SAoC?
We can try to market this project to students at UPB but ultimately we would still need a primary mentor, as I don't think I can fill that role; I can be a secondary mentor that helps the student navigate the dmd codebase, but ultimately someone with experience in LSPs should be mentoring (Jacob?).
Jul 23 2019