Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for NamedPipes #250

Closed
TylerLeonhardt opened this issue Aug 29, 2018 · 5 comments
Closed

Support for NamedPipes #250

TylerLeonhardt opened this issue Aug 29, 2018 · 5 comments

Comments

@TylerLeonhardt
Copy link

TylerLeonhardt commented Aug 29, 2018

Hi there!

I'm the maintainer of the PowerShell language server, PowerShell Editor Services.

@ant-druha has been working very hard on making a PowerShell extension for Intellij-IDEs. This leverages lsp4j. However, he's run into an issue.

The PowerShell language server uses NamePipes (or UNIX domain sockets) to communicate with the language client - this is so that an extension can leverage a PowerShell Integrated Console that we expose via stdio.

What @ant-druha has noticed is that Java + NamedPipes don't get along well when you treat them as InputStream and OutputStream see here and here.

Concurrent read/write doesn't seem possible this way which is the only way to leverage lsp4j.

so what's the solution?

Sadly, I'm not too familiar with the Java ecosystem so I don't have an answer... but if there is another way to do concurrent reads and writes with NamedPipes, perhaps another constructor could be added to take that in.

Any thoughts?

@spoenemann
Copy link
Contributor

When you use LSP4J with Java sockets, make sure you use the AsynchronousServerSocketChannel, but not the ServerSocketChannel. As you mentioned, the latter does not support concurrent read/write.

@ant-druha
Copy link

ant-druha commented Aug 30, 2018

@spoenemann not sure I understand your suggestion. The request is about non-blocking Named pipes connection support, not about tcp sockets. There are no issues with using tcp sockets for lsp4j transport.

@spoenemann
Copy link
Contributor

I never tried using such named pipes in Java...

@jonahgraham
Copy link
Contributor

Is this still an issue LSP4J needs to solve? The linked issue is fixed in ant-druha/intellij-powershell#6

@apupier
Copy link
Contributor

apupier commented Oct 15, 2021

I guess not. I think it will be safe to close the issue (to clean the backlog)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants