tree-sitter / tree-sitter-ocaml

OCaml grammar for tree-sitter
MIT License
74 stars 23 forks source link

Swift package includes dependencies #92

Open mattmassicotte opened 4 months ago

mattmassicotte commented 4 months ago

Hello!

I'm incorporting this parser into my project using the Swift bindings. I was suprirsed to find that the package here includes a dependency. I happen to be the author of that dependency, and am already using it. But, its presense, along with the tests, are really non-standard. No other tree-sitter parser that has Swift bindings is structured this way.

Normally, I would say this is harmless, but I'm not 100% sure that is the case. It is possible to use tree-sitter from Swift without this dependency, but because its there that could make other client's lives more complex.

I'd like to propose removing both the dependency and tests. No other Swift bindings has these, and the tests really just exercise that the C API is exposed to Swift. That does have some utility. But given how unusual it is, that this would only affect Swift users, I think its totally fine to lower the support burden on you keeping/running these.

314eter commented 3 months ago

Both the dependency and tests are included in the default tree-sitter templates.

I see the template includes dependencies: [] in the target. Does that fix the dependency issue? I'd prefer to keep the tests if possible.

I don't know anything about Swift, so I can't really judge what's the best approach, but it's probably best to open a tree-sitter issue to update the templates first.

mattmassicotte commented 3 months ago

Oh no, you are right. That template is the source of these problems. I will work on that first, thank you for letting me know about it!

I'll get back to you if I can make progress there.