tree-sitter / tree-sitter-haskell

Haskell grammar for tree-sitter.
MIT License
151 stars 36 forks source link

"undefined symbol: tree_sitter_haskell_external_scanner_create" when running "tree-sitter test" #94

Closed Kleidukos closed 1 year ago

Kleidukos commented 1 year ago

Version: tree-sitter 0.20.7

Hi! I'm trying to re-use the grammar for learning with a haskell-like language, an I get this message when I run tree-sitter test:

❯ tree-sitter test          
Error opening dynamic library "/home/hecate/.cache/tree-sitter/lib/haskell.so"

Caused by:
    /home/hecate/.cache/tree-sitter/lib/haskell.so: undefined symbol: tree_sitter_haskell_external_scanner_create

It's fairly hard to look up on search engines. Any idea what could be the cause?

tek commented 1 year ago

hm, no clue. tree-sitter too old maybe? is that a fresh checkout? did you try deleting that haskell.so?

Kleidukos commented 1 year ago

I know realise it looks a lot like https://github.com/tree-sitter/tree-sitter-haskell/issues/43 but I'm just trying to use the bindings from a Haskell program.

tek commented 1 year ago

ah, how do you do that?

Kleidukos commented 1 year ago

I just took the grammar files and I was intending to use https://flora.pm/packages/@hackage/tree-sitter.

That being said, I tried to run tree-sitter test in a fresh clone of the repo, and it worked! I'll try to see what I can remove without breaking everything :)

tek commented 1 year ago

hmm there is a submodule in the repo here: https://github.com/tree-sitter/haskell-tree-sitter/tree/master/tree-sitter-haskell/vendor that is from 2018, maybe that causes a conflict? how did you add the grammar files?

Kleidukos commented 1 year ago

Just by copying them in my own repo, reproducing the grammar/ directory hierarchy. But the submodule is not yet a problem because I'm hitting the error on tree-sitter test and not from Haskell. I'm closing this issue now and I'll re-open when I have more concrete stuff to bring. For now I'll be using a full clone of the repo as a starting point. :)

tek commented 1 year ago

good luck!