‹ BackHN Continuity

Thread

Why building a Rust LSP is hard

144 points · 77 comments · agluszak

  1. octoberfranklin · · focus · HN ↗
    Enter hell: LSP assumes that it's the source of truth, but you still need to access the filesystem yourself, and do it in a synchronized way

    LSP is an example of utterly horrid technical design.

    Stop letting Microsoft design protocols and APIs. They are so. bad. at. it.

    1. duttish · · focus · HN ↗
      I've never looked into LSP, how would you design it?
      1. mitxela · · focus · HN ↗
        Start with synchronous function calls instead of JSON. Microsoft knows how to do that - they invented COM and OLE. Function calls enable whatever data sharing is necessary to maintain a coherent view. Imagine trying to do OLE with JSON - just wouldn't work. (Does OLE still exist?)
        1. cyberax · · focus · HN ↗
          Stupid idea.

          So the LSP crashes and/or goes into a runaway memory consumption loop. And your main application dies with it.

          Or what if you want, you know, to be able to use the same LSP from TWO different applications at the same time?

          Never mind issues with other managed runtimes not expecting to deal with something else in their address space.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.