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

Missing configuration file message causes error in Sublime Text #54

Closed
LPGhatguy opened this issue Nov 20, 2023 · 5 comments
Closed

Missing configuration file message causes error in Sublime Text #54

LPGhatguy opened this issue Nov 20, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@LPGhatguy
Copy link

When configuring ra-multiplex on Windows with Sublime Text, it looks like ra-multiplex prints a message to stdout about missing the config file, which the LSP extension interprets as invalid.

Here is the output from Sublime Text 4, build 4152, with version 1.26.0 of the LSP extension:

LSP: rust-analyzer crashed (1 / 5 times in the last 180.0 seconds), exit code 1, exception: None
LSP: rust-analyzer crashed (2 / 5 times in the last 180.0 seconds), exit code 0, exception: Unexpected payload in server's stdout:

�[32m INFO�[0m cannot load config, continuing with defaults �[3merr�[0m�[2m=�[0mcannot read config file C:\Users\lucien\AppData\Roaming\ra-multiplex\config\config.toml

LSP: rust-analyzer crashed (3 / 5 times in the last 180.0 seconds), exit code 1, exception: None
LSP: rust-analyzer crashed (4 / 5 times in the last 180.0 seconds), exit code 1, exception: None
LSP: rust-analyzer crashed (5 / 5 times in the last 180.0 seconds), exit code 1, exception: None

It seems like there are other errors here as well, as sometimes the process exits with code 1 and no unexpected stdout. I don't know which end the issue could be on.

Creating the config file suppresses this issue, but ra-multiplex still has the exit error on my system under Sublime Text. The patch given in #52 doesn't seem to help anything on my system.

@pr2502 pr2502 added the bug Something isn't working label Nov 21, 2023
@pr2502
Copy link
Owner

pr2502 commented Nov 21, 2023

This appears to originate from switching from env_log to tracing-subscriber as the default fmt layer prints to stdout https://docs.rs/tracing-subscriber/latest/tracing_subscriber/fmt/index.html but we need it to print to stderr. Thanks for catching this.

@pr2502
Copy link
Owner

pr2502 commented Nov 21, 2023

Can you verify this is the case and #55 resolves at least the first Sublime Text error?

@LPGhatguy
Copy link
Author

Yep, the output issue is solved by that PR, very nice!

Do you have any advice for tracking down the cause of the other error? I'd love to be able to get you an error message or anything actionable. 😅

@pr2502
Copy link
Owner

pr2502 commented Nov 21, 2023

Try running the server with more verbose log level if you see anything useful there, debug or potentially trace. Does Sublime Text log the proxy client stderr somewhere? Maybe try running Sublime Text from a terminal if it shows up there. Exit 1 means an anyhow error was returned from main, like for example if the server is not running:

$ ra-multiplex
Error: connect

Caused by:
    Connection refused (os error 111)
$ echo $?
1

But without the log message it could be anything.

@pr2502
Copy link
Owner

pr2502 commented Mar 11, 2024

I'll close this since the first bad Issue is long solved and there has been no more context added to the second issue. Feel free to open a new issue for the second error if you have more context :)

@pr2502 pr2502 closed this as completed Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants