CatalaLang / catala

Programming language for literate programming law specification
https://catala-lang.org
Apache License 2.0
1.99k stars 77 forks source link

catala-language-server: investigate ATD for cross-window messaging #672

Open rprimet opened 2 months ago

rprimet commented 2 months ago

In catala-language-server, we use ATD type definitions to exchange data between a compiler plugin and the UI ; but the UI itself is split in two sections (an outer 'shell' that can acces the vs code API, and an inner webview that is restricted to sending and receiving messages from its parent).

It seems that, although complex (JSON-able) structures can be passed by message passing, in doing so, we lose all type info.

We should investigate replacing messages.ts in the current catala test UI code by ATD-generated code that would come with the appropriate parsing and serializing functions