tree-sitter/haskell-tree-sitter

Template Haskell splices appear to pick the wrong tree-sitter version during AST codegen

patrickt opened this issue · 3 comments

Occasionally, after a cabal new-update, our package store will get into a state where we can’t successfully compile any of the language packages:

TreeSitter/TypeScript.hs:15:37: error:
    • Couldn't match type ‘tree-sitter-0.5.0.0:TreeSitter.Language.Language’
                     with ‘Language’
      NB: ‘Language’
            is defined in ‘TreeSitter.Language’
                in package ‘tree-sitter-0.5.0.0’
          ‘tree-sitter-0.5.0.0:TreeSitter.Language.Language’

The only successful remedy for this is to nuke one’s ~/.cabal/store, which entails a great deal of tedious recompilation. This bug has been haunting me since at least September. I know that @tclem and @rewinfrey have run into this. We thought we fixed this in semantic by depending on a semantic-source from Hackage, rather than the local project; this appears not to be the case.

This might be a Cabal bug, but I honestly don’t know.

See also #98: generating code would solve this problem entirely.

Per haskell/cabal#6412, the issue appears to be the internal libraries, so it’s unclear that #98 would actually address this.

Per haskell/cabal#6412, the issue appears to be the internal libraries, so it’s unclear that #98 would actually address this.

Per @maxbrunsfeld, this may be incorrect since #98 would mean we might not need to have the internal libraries at all.

I think we can close this in favor of haskell/cabal#6412.