-
Notifications
You must be signed in to change notification settings - Fork 94
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
console.debug statements break the protocol #1142
Comments
This is related to #540
@priyamsahoo @ganeshrn WFYT about this? I did not dig into it but I based on standard POSIX practices we should:
In theory we could log as json, but we cannot guarantee that everything send to stderr is json, as other libraries might log using non standard logging and break the output. |
I would very much appreciate logging on stderr since
Logging to |
Non-spec stdout also breaks Sublime's LSP plugin sublimelsp/LSP#1612 |
Do not log validation status on stdout, use connection logs instead. See #540, ansible#541
* Stdio patch Do not log validation status on stdout, use connection logs instead. See #540, #541 * Fix: use optional chaining for connection as it may not exist for purposes of testing. --------- Co-authored-by: Priyam Sahoo <[email protected]>
Any chance we can get a point release containing ansible/ansible-language-server#604 now that it's been merged? Would be really helpful for people using different clients |
Summary
When running
ansible-language-server
with the--stdio
flag (which appears to be the only supported way as of1.0.4
),console.debug
statements are emitted on stdout. This is an issue because some systems like ycmd use language servers via stdout and interpret all data in stdout as protocol data, which causes ycmd to crash.I have filed a bug on the ycmd side to make it more resilient to invalid protocol commands, but the opinion of the maintainers was that this language server also needs to behave better.
ycm-core/ycmd#1673
Extension version
VS Code version
N/A
Ansible Version
OS / Environment
MacOS, ycmd
Relevant log output
The text was updated successfully, but these errors were encountered: