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

OTP 26 support #923

Merged
merged 9 commits into from
Jun 25, 2023
Merged

OTP 26 support #923

merged 9 commits into from
Jun 25, 2023

Conversation

lukaszsamson
Copy link
Collaborator

No description provided.

@lukaszsamson lukaszsamson merged commit 88dd761 into master Jun 25, 2023
19 checks passed
@lukaszsamson lukaszsamson deleted the otp26 branch June 25, 2023 20:51
@lukaszsamson lukaszsamson mentioned this pull request Jun 25, 2023
5 tasks
@garazdawi
Copy link

Nice to see that you got it working! Just a note that intercepting user and standard_error like you do here will be quite fragile as it is not something that we support nor test that it should work. Would you mind describing what it is that you are trying to achieve and maybe we can create an API for it instead?

@lukaszsamson
Copy link
Collaborator Author

@garazdawi
I wouldn't call it fragile - it worked without problems for 6 years, dialyzer or ssl support breaks on almost every release.

What we do here is intercept standard IO so everything written to stdout and stderr is wrapped in LSP protocol messages, serialized to JSON and printed to stdout in binary. See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification/#baseProtocol for details. The reason we do the interception is we don't have control over what build plugins/tools/libs print to std and each message printed that is not LSP breaks the communication channel.

@garazdawi
Copy link

I wouldn't call it fragile - it worked without problems for 6 years, dialyzer or ssl support breaks on almost every release.

Sure, but we haven't done many changes to the shell and its tools in the last 10+ years. We have however now started to do much more work in that area and the more tools that rely on undocumented and untested behavior, the more things we will accidentally break.

What we do here is intercept standard IO so everything written to stdout and stderr is wrapped in LSP protocol messages, serialized to JSON and printed to stdout in binary. See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification/#baseProtocol for details. The reason we do the interception is we don't have control over what build plugins/tools/libs print to std and each message printed that is not LSP breaks the communication channel.

That's what I thought was going on, thanks for confirming. I'll have a think about how we can create an official API for you to use inorder to intercept user output.

happysalada pushed a commit to NixOS/nixpkgs that referenced this pull request Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants