Skip to content

Conversation

pixilation
Copy link

When using parser.setLanguage(myLang), the UnwrapLanguage function checks that the ABI version is compatible.

If the language is not compatible, an error like this is created:

RangeError: Incompatible language version. Compatible range: 13 - 14. Got: 15`
    at Parser.setLanguage

Due to a refactoring of the exceptions, this RangeError is created but not thrown. The UnwrapLanguage function returns a null pointer instead.

This leads to cryptic errors elsewhere, such as:

TypeError: Cannot read properties of undefined (reading 'length')
    at initializeLanguageNodeClasses
    at Parser.setLanguage

This is resulting in issues being raised in other repos, such as tree-sitter/tree-sitter#4234.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants