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

roslyn-lsp --stdio option #76436

Open
seblj opened this issue Dec 14, 2024 · 3 comments · May be fixed by #76437
Open

roslyn-lsp --stdio option #76436

seblj opened this issue Dec 14, 2024 · 3 comments · May be fixed by #76437
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@seblj
Copy link

seblj commented Dec 14, 2024

Summary

We just got support for a named pipe from a client to connect to the server, and it seems from the other issue that you would be open to a PR for a stdio option as well. I thought I would open an issue about stdio for tracking potential progress on this

Background and Motivation

I am maintaining a plugin for roslyn support in neovim, and it would really simplify my solution if stdio support is added

Proposed Feature

Support --stdio flag when starting the server

Context

I am considering looking into this myself, but I thought I would add a tracking issue first so if someone else beats me to it, they could post a comment here or link a PR to this issue :)

@jasonmalinowski
Copy link
Member

Just one general caveat about this request: since Roslyn loads code we don't own (like analyzers, source generators, etc.) it's always possible that somebody might write to stdout in a way we can't prevent. #76437 right now discusses redirecting Console.Out -- which is a good idea, don't get me wrong -- but that still won't prevent anybody doing shenanigans and directly grabbing the file handle. I Really, Really, Really™ hope nobody is doing that in the wild, but just be aware it's always possible for your LSP stream to get broken.

@CyrusNajmabadi
Copy link
Member

That's already doc'ed as disallowed. Roslyn extensions are not allowed to perform IO of any kind. This follows that model.

@jasonmalinowski
Copy link
Member

Yes, on paper it's disallowed. Just letting @seblj not to be too surprised when in a year or two they find some customer using some analyzer doing the bad thing. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants