Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [linuxtools-dev] Using a Dockerfile language server for the Docker editor...

Hi Roland,

Thank you for taking a look at this and sorry for taking two whole
months to respond.


On Wed, Aug 23, 2017 at 3:26 AM, Roland Grunberg <rgrunber@xxxxxxxxxx> wrote:
> So after some discussion, it made sense to approach this the same way
> other Node.js language server consuming clients have gone, so that
> means relying on Node.js being on the system as opposed to providing it
> by container environment.

That is too bad as I finally got around to making a Docker image that
wraps the language server. :(

> A prerequisite CQ on Node.js is fine, but the dependency list for
> dockerfile-language-server-nodejs seems a little crazy (for Eclipse
> standards). Just doing an npm install shows a giant tree, and since all
> those dependencies contribute javascript packages/functions that are
> needed at runtime, I think they would need to be included in whichever
> CQ, but it just doesn't seem possible to file a single CQ per package.

The reason `npm install` shows a giant tree is because of
development-time dependencies such as the JavaScript testing framework
Mocha. If you use `npm install --production` you will see that the
list is not as scary looking.

$ npm install --production
dockerfile-language-server-nodejs@0.0.10 dockerfile-language-server-nodejs
`-- vscode-languageserver@3.5.0-next.6
  +-- vscode-languageserver-protocol@3.5.0-next.5
  | +-- vscode-jsonrpc@3.5.0-next.2
  | `-- vscode-languageserver-types@3.5.0-next.2
  `-- vscode-uri@1.0.1

I went ahead and did a quick search in IPZilla and found that the
Eclipse Che project already had a few CQs opened. Not too surprising
given that the Che project also makes heavy use of third-party
language servers.

vscode-jsonrpc 3.3.1
https://dev.eclipse.org/ipzilla/show_bug.cgi?id=14120

vscode-languageserver 3.3.0
https://dev.eclipse.org/ipzilla/show_bug.cgi?id=14121

vscode-languageserver-types 3.3.0
https://dev.eclipse.org/ipzilla/show_bug.cgi?id=14122

Admittedly, their dependencies are not as crazy bleeding edge as me.
Still, I'm only using bleeding edge stuff to add support for an
feature in the next release of VS Code. So, I modified my package.json
file to point to vscode-languageserver 3.3.0 instead and ran `npm
install --production` again. I got the following result.

$ npm install --production
dockerfile-language-server-nodejs@0.0.10
C:\Users\Remy\code\github\tmp\dockerfile-language-server-nodejs
`-- vscode-languageserver@3.3.0
  +-- vscode-jsonrpc@3.4.1
  `-- vscode-languageserver-types@3.4.0

Not exactly what Che has opened up in IPZilla but very close. In
actuality, vscode-languageserver 3.3.0's package.json reads:

"dependencies": {
  "vscode-jsonrpc": "^3.3.0",
  "vscode-languageserver-types": "^3.3.0"
}

So I don't see why it wouldn't just work with vscode-jsonrpc 3.3.1 and
vscode-languageserver-types 3.3.0. Sounds like I need to create a
branch that doesn't on the new stuff and see where that leads me...

Regards,
Remy


Back to the top