Should we remove the dependency on tree-sitter-json
?
#1023
Closed
Xophmeister
started this conversation in
Polls
Replies: 1 comment
-
I've gone ahead and implemented this in #1032 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Before dynamic loading was implemented, all supported Tree-sitter grammars were explicit dependencies of Topiary. The move to dynamic loading obviated the need for that, but a few still remain in
Cargo.toml
for testing purposes. For example, #1022 discusses removing the dependency ontree-sitter-nickel
, making the dynamic loading configuration the single source of truth. A similar question can be asked fortree-sitter-json
.tree-sitter-json
is only required because it is used in a single doctest:topiary/topiary-core/src/lib.rs
Lines 184 to 226 in 2d38444
Pro: This doctest is for the main
formatter
function, so it's an important and valuable example for developers. Rewriting it to use the dynamic loading mechanism may obscure the test, making it less clear and less valuable.Con: It's a maintenance burden -- albeit a minimal one -- to keep the version of
tree-sitter-json
aligned in bothCargo.toml
andtopiary-config/languages.ncl
. It's also surprising to see it inCargo.toml
without knowing Topiary's development history.1 vote ·
Beta Was this translation helpful? Give feedback.
All reactions