Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

RLS fails for format code #1505

Closed
ctron opened this issue Jul 2, 2019 · 10 comments
Closed

RLS fails for format code #1505

ctron opened this issue Jul 2, 2019 · 10 comments

Comments

@ctron
Copy link

ctron commented Jul 2, 2019

As reported in eclipse-corrosion/corrosion#252 the RLS fails to format the code with:

[t=1562070660321] LSP4E to org.eclipse.corrosion.rls:
{"jsonrpc":"2.0","id":"11","method":"textDocument/formatting","params":{"textDocument":{"uri":"file:///home/jreimann/Development/workspace-esp32-rust/rust-esp32-hono/src/main.rs"},"options":{"tabSize":4,"insertSpaces":false}}}
[t=1562070660322] org.eclipse.corrosion.rls to LSP4E:
{"jsonrpc":"2.0","error":{"code":-32603,"message":"Reformat failed to complete successfully"},"id":"11"}
@Xanewok
Copy link
Member

Xanewok commented Jul 14, 2019

Hey, thanks for the report! Looking at the original issue, you said you happened to reproduce it using https://github.com/itadinanta/gfx-gtk. Did cargo check compile the project successfully in that case?

@ctron
Copy link
Author

ctron commented Jul 15, 2019

cargo check fails as the target is unknown to the locally installed toolchain. However that shouldn't prevent it from formatting the code IMHO.

@alexheretic
Copy link
Member

I think #1533 may help with this case too, can you retest with the latest code?

@norru
Copy link

norru commented Sep 6, 2019

Hi @alexheretic, #1533 fixed it for me, many thanks!

@ctron, worth another shot?

@ctron
Copy link
Author

ctron commented Sep 6, 2019

Sure, what do I need to update?

@norru
Copy link

norru commented Sep 6, 2019

A simple rustup update did it for me a few days ago. I am on nightly though.

@alexheretic
Copy link
Member

I believe #1533 won't be on stable until the next release, I've been using beta channel rls recently because of that.

@ctron
Copy link
Author

ctron commented Sep 9, 2019

Ok, I did a rustup update as few days back. But I am on stable, and still have the same issue.

@norru
Copy link

norru commented Sep 9, 2019

@ctron as @alexheretic said, it probably hasn't made it through to stable yet.

@alexheretic
Copy link
Member

On stable now :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants