Skip to content

Doesn't support OS: FreeBSD #109

@abishai

Description

@abishai

Describe the bug
I installed Idea plugin that uses free-sitter and found it doesn't work because of

Caused by: java.lang.RuntimeException: Does not support OS: freebsd
	at org.treesitter.utils.NativeUtils.getFullLibName(NativeUtils.java:28)
	at org.treesitter.utils.NativeUtils.loadLib(NativeUtils.java:111)
	at org.treesitter.TreeSitterKotlin.<clinit>(TreeSitterKotlin.java:9)

We have tree-sitter in the port system and binaries are installed in /usr/local/lib. Can you provide limited support to unsupported systems? No need to package .so file, but support to set custom library.
The code bails out here:

throw new RuntimeException(String.format("Does not support OS: %s", osName));

Expected behavior
If pre-packaged binary absent or can't be determined at all, check for user provided library name and path.

OS and Java version

  • FreeBSD 14.3 x64
  • OpenJDK21

Probably, Linux users with exotic archs will benefit as well, because current code fails the same way if arch is not in the list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions