corrosion: "Out of order change" error

I am getting the following error quite often while editing formatting code with Ctrl+Shift+F

“Out of order change in […].rs”

image

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 21 (14 by maintainers)

Most upvoted comments

I was also able to reproduce the bizarre Error Reports when formatting the code and opened a corresponding Issue with the RLS Project: Unexpected Operator Error from RLS

I can understand a language being slow or even ignoring some requests in some cases when it’s very busy with other things, but processing change events in the right order is a must have for LSP; alternative behaviours are bugs in the LS.

The official Project Documentation states: rls - Project Issues

Project issues If a project has a lot of dependencies, initial indexing might take a long time. In general, initial indexing should take about the same time as a full compile of the project (usually a little less time, but that depends).

If the primary crate of a project is large, it probably won’t work well with the RLS (too slow). Exactly what ‘large’ means here will depend on how fast your machine is and how tolerant of latency you are.

The expression “tolerant of latency” is especially directed to Client Applications.

rls - Large Files

Crates with large data files Some crates can have surprisingly large data files. Large data files can slow down the RLS to the point of crashing (or appearing to crash).

So, a slow Response Time is a documented Limitation of the rls and a Workaround is actually required to mitigate this.

Eclipse LSP client actually sending “real-time” requests to the RLS process (ie, one request per keystroke)? If this is the case the bug is in the LSP/Corrosion site,

LSP4E sends a notification on every keystroke. It’s conform to LSP and works for all language servers. If RLS cannot deal with it, then it means RLS is not behaving properly as defined by LSP specification.

Last I heard is that rust-analyzer is not quite ready to replace RLS as yet,

When I posted about latest Corrosion release on Reddit, people were all telling how rust-analyzer is better and should be used instead. The only thing that prevents from moving is that the project is still declared as unstable on Cargo, and we don’t really have the capacity to deal with projects that are still advertising themselves as unstable as it means we’ll probably have a higher maintenance cost for some time.

When formatting the code with indentation it often produces garbage errors with erronous non existing functions like:

cannot find function `nonot_existing_function()` in this scope.

help: a function with similar name exists: `existing_function()` 

which seems me to indicate a desynchronization error due to partial updates.

Those errors also cannot be solved but only by whole editor restart.