tweag / topiary

https://topiary.tweag.io/
MIT License
582 stars 29 forks source link

Remove OCaml (and JSON?) grammar dependencies #796

Open Xophmeister opened 3 days ago

Xophmeister commented 3 days ago

Since moving to dynamic loading, there is no functional need for tree-sitter-ocaml and tree-sitter-json to be dependencies. Technically speaking, they're dev-dependencies, so don't impact the release build (but nonetheless make the Cargo.toml a bit confusing):

topiary-core ought to be tested. Using a small grammar like JSON seems like a reasonable option; although, if there's some stub grammar that can be used for this kind of testing, maybe that would be more appropriate.

Benchmarking against OCaml makes sense as the grammar and our formatting queries are non-trivial. However, perhaps this can be moved out of topiary-core and into a separate project, which can then make use of topiary-config's dynamic loading support.

Xophmeister commented 3 days ago

(Alternatively, we could just put comments in the Cargo.toml describing what these grammars are for...)