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

FsAutoComplete not working on Replit #1109

Open
thyvini opened this issue Apr 26, 2023 · 5 comments
Open

FsAutoComplete not working on Replit #1109

thyvini opened this issue Apr 26, 2023 · 5 comments

Comments

@thyvini
Copy link

thyvini commented Apr 26, 2023

I've created an empty F# env in replit, and tried to set LSP, but it's not working. When trying to run manually, it's failing with the following exception:

[16:17:05.107 ERR] [Startup] Start - LSP mode crashed
System.AggregateException: One or more errors occurred. (Header does not end with expected 
 character sequence: )
 ---> StreamJsonRpc.BadRpcHeaderException: Header does not end with expected 
 character sequence: 
   at StreamJsonRpc.HeaderDelimitedMessageHandler.ReadHeadersAsync(CancellationToken cancellationToken)
   at StreamJsonRpc.HeaderDelimitedMessageHandler.ReadCoreAsync(CancellationToken cancellationToken)
   at StreamJsonRpc.MessageHandlerBase.ReadAsync(CancellationToken cancellationToken)
   at StreamJsonRpc.JsonRpc.ReadAndHandleRequestsAsync()
   --- End of inner exception stack trace ---
   at Ionide.LanguageServerProtocol.Server.startWithSetup[client](FSharpFunc`2 setupRequestHandlings, Stream input, Stream output, FSharpFunc`2 clientCreator, FSharpFunc`2 customizeRpc) in /_//src/LanguageServerProtocol.fs:line 179
   at Ionide.LanguageServerProtocol.Server.start@276-2.Invoke(FSharpFunc`2 customizeRpc) in /_//src/LanguageServerProtocol.fs:line 276
   at FsAutoComplete.Lsp.FSharpLspServerModule.startCore(ToolsPath toolsPath, DirectoryInfo stateStorageDir, FSharpFunc`2 workspaceLoaderFactory) in /home/runner/work/FsAutoComplete/FsAutoComplete/src/FsAutoComplete/LspServers/FsAutoComplete.Lsp.fs:line 2984
   at FsAutoComplete.Parser.lspFactory@157-1.Invoke(Unit unitVar0) in /home/runner/work/FsAutoComplete/FsAutoComplete/src/FsAutoComplete/Parser.fs:line 157
   at FsAutoComplete.Lsp.FSharpLspServerModule.start(FSharpFunc`2 startCore) in /home/runner/work/FsAutoComplete/FsAutoComplete/src/FsAutoComplete/LspServers/FsAutoComplete.Lsp.fs:line 3026
@thyvini
Copy link
Author

thyvini commented Apr 26, 2023

I've tried both with and without --adaptive-lsp-server-enabled

@baronfel
Copy link
Contributor

This looks like a protocol-level failure - do you have any docs or have any expertise with replit in terms of how they set up their character sets/encodings for spawned applications?

@thyvini
Copy link
Author

thyvini commented Apr 26, 2023

I don't, I've tried to find for something more deep in the documentation but couldn't find anything, I will try to ask for support from them.

@vzarytovskii
Copy link

Look similar to #1185, suspicious.

@thyvini
Copy link
Author

thyvini commented Dec 18, 2023

Got an update.

I can now set up the LSP and it seems to run, but I'm getting another error:

[VRB] Errors while processing code action request for file:///home/runner/FSharp/main.fs with {"Diagnostics":[],"Only":null,"TriggerKind":null,"$type":"CodeActionContext"} at {"Start":{"Line":14,"Character":4,"$type":"Position"},"End":{"Line":14,"Character":4,"$type":"Position"},"$type":"Range"}: ["No typecheck results for /home/runner/FSharp/main.fs","No typecheck results for /home/runner/FSharp/main.fs","No typecheck results for /home/runner/FSharp/main.fs","No typecheck results for /home/runner/FSharp/main.fs","No typecheck results for /home/runner/FSharp/main.fs","No typecheck results for /home/runner/FSharp/main.fs","No typecheck results for /home/runner/FSharp/main.fs","No typecheck results for /home/runner/FSharp/main.fs","No typecheck results for /home/runner/FSharp/main.fs"]

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

4 participants