tree-sitter / haskell-tree-sitter

Haskell bindings for tree-sitter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generating datatypes in TH splices makes multi-package repl/ghcide integration difficult

robrix opened this issue · comments

We currently generate AST/grammar datatypes in TH splices. Unfortunately, this makes things which have to work with multiple components, e.g. a multi-package repl script & repo-wide ghcide configuration, impossible, because there’s no way to tell it that it needs to build the .o files for the parsers before trying to use the tree_sitter_* pointers to generate these datatypes.

Per @maxbrunsfeld, one workaround would be to do #98 since then the code we’d be loading would be static on disk, and wouldn’t need to be linked against the internal libraries at all, which might in turn obviate the need for them to exist in the first place, which would also fix #238.

The code generation has moved to https://github.com/github/semantic, in the semantic-codegen package.