baml
baml copied to clipboard
Refactor the parsing of BAML function kwargs and args by using a common library
We have a ton of places where we parse function args information:
- Python (when we serialize things into logs)
- Boundary studio --- when reading the logs and rendering inputs in the UI
- VSCode --- (a) when saving and (b) rendering test contents
- In the Rust compiler
This is currently one of the top sources of bugs, because we don't have a well defined representation of these arguments and types, and we don't have a common library with a set of utilities that can be used to render them in various places.
Current proposal is:
- Rust package is created to serialize and deserialize any inputs/outputs related to these types
- TS react package to provide some helper utilities on top of rust to render these objects nicely in VSCode playground, and in Boundary Studio.
We now have common utility functions in the website/common package and vscode/common package to at least read the data consistently. The urgency has dropped since we have a solution now but it'd be good to just have a common lib for all langs.