enso-org / enso

Enso Analytics is a self-service data prep and analysis platform designed for data teams.
https://ensoanalytics.com
Apache License 2.0
7.36k stars 323 forks source link

Simplify parser frontend bindings #10752

Open kazcw opened 3 months ago

kazcw commented 3 months ago

We can eliminate the JS AST implementation, and most associated code. Specifically, we can eliminate all type-specific handwritten AST JS, and all generated AST JS except printing.

This would make it easier to deliver AST-related features, improve performance of parsing in JS, improve app load time, simplify future parser improvements, and reduce potential for bugs.

I've divided the steps necessary into small independently-implementable (with some ordering dependencies) tasks. Most of these steps benefit simplicity✨ or performance🚀 on their own.

### Eliminate our AST deserialization
- [ ] https://github.com/enso-org/enso/issues/10753
- [ ] https://github.com/enso-org/enso/issues/10754
- [ ] https://github.com/enso-org/enso/issues/5453
- [ ] Serialize AST data directly to Y.Js format ✨🚀
### Eliminate JS `Ast` types
- [ ] https://github.com/enso-org/enso/issues/10755
- [ ] Switch to a type-tagged object interface to construct and distinguish `Ast` types
- [ ] Generate TS declarations from AST type info
- [ ] Implement one object supporting all AST types generically ✨🚀🚀✨
kazcw commented 6 days ago

Other API improvements / steps toward above goals: