bonede / tree-sitter-ng

Next generation Tree Sitter Java binding.
MIT License
71 stars 10 forks source link

Update Kotlin Definition to 0.3.8 #54

Open samzurcher opened 1 month ago

samzurcher commented 1 month ago

Please update the Kotlin definitions to 0.3.8; see

for context. Thanks so much!

bonede commented 1 month ago

Hi, 0.3.8 has been pushed to maven repository.

samzurcher commented 1 month ago

Thanks a lot!

samzurcher commented 3 weeks ago

Note: When using

TSParser().also { it.setLanguage(TreeSitterKotlin()) }.parseString(null, sourceCode)

with the input

package somepackage

abstract class AAbstractClass

I get a JVM crash:

C  [x86_64-linux-gnu-tree-sitter-kotlin.so+0x402d1a]  tree_sitter_kotlin_external_scanner_serialize+0xfa
C  [x86_64-linux-gnu-tree-sitter.so+0x9aec0]  ts_parser__external_scanner_serialize+0x390
C  [x86_64-linux-gnu-tree-sitter.so+0x8f4a6]  ts_parser__lex+0xa86
C  [x86_64-linux-gnu-tree-sitter.so+0x39a0c]  ts_parser__advance+0x2cc
C  [x86_64-linux-gnu-tree-sitter.so+0x36a58]  ts_parser_parse+0x1e98
C  [x86_64-linux-gnu-tree-sitter.so+0x404fe]  ts_parser_parse_string_encoding+0x6e
C  [x86_64-linux-gnu-tree-sitter.so+0x4047e]  ts_parser_parse_string+0x2e
C  [x86_64-linux-gnu-tree-sitter.so+0xb9bbb]  Java_org_treesitter_TSParser_ts_1parser_1parse_1string+0x45b
j  org.treesitter.TSParser.ts_parser_parse_string(JJLjava/lang/String;)J+0
j  org.treesitter.TSParser.parseString(Lorg/treesitter/TSTree;Ljava/lang/String;)Lorg/treesitter/TSTree;+19
bonede commented 1 day ago

Hi,

Please upgrade to 0.3.8.1. This should fix the issue.