tree-sitter / tree-sitter-haskell

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

as of `381dca04`, parsing hangs on any input when called from Rust #33

Closed BrianHicks closed 3 years ago

BrianHicks commented 3 years ago

Hey there! It appears that as of 381dca04, this grammar fails to terminate on any Haskell file when called from the tree-sitter library for Rust (I used 0.19.3.) The behavior shows up as parsing failing to terminate. I haven't found any syntax in particular that triggers or avoids this; it happens on every file I tested (even a blank file).

I bisected, and 1b00b9f (the commit before 381dca04) was the last commit where parsing terminated.

Here's a SSCCE project that demonstrates the issue: https://git.bytes.zone/brian/tree-sitter-haskell-sscce. I used Nix to get a reproducible environment for this. Happy to help y'all get it set up locally if necessary!

tek commented 3 years ago

hey @BrianHicks! I totally didn't see the issue, sorry for that. Afair, I committed some broken parser code back then, is this still happening? In any case, please try with >0.19.4.

BrianHicks commented 3 years ago

Yep, looks like the latest commit (237f4eb) is working fine with 0.19.5. Thank you!