Open PawanKartikS opened 8 months ago
Sorry that this response is not an answer to your question.
I think it's worth considering the content starting here that mention a few other efforts toward using tree-sitter from Java (including a fork of this repository that might have the issue addressed).
I've tried what you've suggested and now I seem to be getting SIGSEGV
when loading in the library:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00000001046f630c, pid=45986, tid=57199
#
# JRE version: Java(TM) SE Runtime Environment Oracle GraalVM 21.0.2+13.1 (21.0.2+13) (build 21.0.2+13-LTS-jvmci-23.1-b30)
# Java VM: Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.2+13.1 (21.0.2+13-LTS-jvmci-23.1-b30, mixed mode, sharing, tiered, jvmci, jvmci compiler, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
# Problematic frame:
# V [libjvm.dylib+0x54e30c] jni_GetFieldID+0x148
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
Edit: I've opened an issue here: https://github.com/seart-group/java-tree-sitter/issues/138.
I was able to successfully build the dynamic library using:
./build.py -o libjava-tree-sitter ../tree-sitter-c-sharp-master
.I'm also able to load the library successfully. However, when I try to set the language to C# via
parser.setLanguage(Languages.cSharp())
, I get a linkage error:I was wondering if I could receive some help. And for note, I'm performing the above steps on an M1 Mac and yes, I did take a look at the in-progress PR. It was that PR that helped me successfully build the dynamic library.