Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove OCaml (and JSON?) grammar dependencies #796

Open
Xophmeister opened this issue Nov 28, 2024 · 2 comments
Open

Remove OCaml (and JSON?) grammar dependencies #796

Xophmeister opened this issue Nov 28, 2024 · 2 comments
Labels
P3 minor: not priorized type: feature request

Comments

@Xophmeister
Copy link
Member

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):

  • tree-sitter-json is used in topiary-core::tests.
  • tree-sitter-ocaml is used in topiary-core's benchmarking.

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 Xophmeister added P3 minor: not priorized type: feature request labels Nov 28, 2024
@Xophmeister
Copy link
Member Author

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

@nbacquey
Copy link
Member

nbacquey commented Dec 4, 2024

I'm currently adding dependencies to tree-sitter-ocaml in topiary-core for #500. If we do something about it for the benchmarks, it should also work for comment processing tests in topiary-core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 minor: not priorized type: feature request
Projects
None yet
Development

No branches or pull requests

2 participants