rcjsuen / dockerfile-language-server

A language server for Dockerfiles powered by Node.js, TypeScript, and VSCode technologies.
MIT License
377 stars 15 forks source link

Server exits immediately when starting server with --socket argument #241

Closed cotigao closed 4 years ago

cotigao commented 4 years ago

I checked out the code and ran all the necessary build and installs on a linux (ubuntu 19.04) machine. Ran the following command to launch the server.

docker-langserver --socket=3000

The moment I run the above command, the server just exits on its own.

> tsc --version
Version 3.9.5
> node --version
v12.16.3
rcjsuen commented 4 years ago

@cotigao Did you open up port 3000 so that it is listening for connections?

cotigao commented 4 years ago

@rcjsuen oops! Guess I got the understanding wrong. I thought the LSP server would be listening on 3000 and the client (IDE) would connect to it. So turns out the client (IDE) needs to start a server that's listening, which means the LSP server (that acts like a client )connects to the client (IDE, which is a server listening on port 300). Please correct me if I have got it wrong, if you feel

rcjsuen commented 4 years ago

So turns out the client (IDE) needs to start a server that's listening, which means the LSP server (that acts like a client )connects to the client (IDE, which is a server listening on port 300).

@cotigao That is correct.

cotigao commented 4 years ago

@rcjsuen If I may ask, is there a specific reason to have it that way?

rcjsuen commented 4 years ago

@cotigao See https://github.com/microsoft/vscode-languageserver-node/issues/245#issuecomment-336054699.

cotigao commented 4 years ago

@rcjsuen Thanks! That seems a bit counter-intuitive. But then I guess it is fine because LSP does not mandate on what medium is to be used for the server and client to establish the connection and to exchange messages.

We can close this issue. Thanks for the prompt respone.

rcjsuen commented 4 years ago

We can close this issue. Thanks for the prompt respone.

No problem. Happy to help.