HVM icon indicating copy to clipboard operation
HVM copied to clipboard

Is there a need for an LSP in HVM?

Open nataneb32 opened this issue 3 years ago • 6 comments

Probably it would need a better error handling. The ideal would be something like Rust errors messaging ( or better ).

In my view there is two approachs for a LSP. Creating something on top of the exposed api for handling error. Or creating a checker from zero. The later is not great, because this means more code to maintain.

nataneb32 avatar Feb 17 '22 05:02 nataneb32

The first approach has the need of creating an api to expose errors. Also should keep in mind how this is gonna play with languages that target hvm.

nataneb32 avatar Feb 17 '22 05:02 nataneb32

I think the first one is much better from a maintainability perspective, and to help embed HVM. Do you have some pointers to help with the first approach?

steinerkelvin avatar Feb 23 '22 14:02 steinerkelvin

I think it's good to adopt to

https://microsoft.github.io/language-server-protocol/

ken-okabe avatar Feb 23 '22 17:02 ken-okabe

I think the first one is much better from a maintainability perspective, and to help embed HVM. Do you have some pointers to help with the first approach?

I think that implement some of this on the parser. That will return a ParserError enum. And than some kind of typing systemish thing to catch at compile time any error, that will happend on runtime.

nataneb32 avatar Feb 24 '22 19:02 nataneb32

Rust has a good approach on the lexer and parser that says to you what was expected.

nataneb32 avatar Feb 24 '22 19:02 nataneb32

I think Kind should have that. HVM is more of a compile target, devs shouldn't be writing large projects on it.

VictorTaelin avatar Nov 23 '22 16:11 VictorTaelin