Open
Conversation
da35af9 to
eafc981
Compare
Marcono1234
reviewed
Sep 1, 2024
| SymbolLookup.libraryLookup(library, arena).or(SymbolLookup.loaderLookup()); | ||
|
|
||
| /** Get the tree-sitter {@code Language} for this grammar */ | ||
| public static MemorySegment language() { |
There was a problem hiding this comment.
Would it make sense to have two variants?
TreeSitterJava.language()TreeSitterJava.language(SymbolLookup)
The former could then simply delegate to the latter, and use your existing logic here with System.mapLibraryName(...).
It can be useful if users can provide the SymbolLookup themselves:
- It allows them to control where the library is loaded from, e.g. they can use a temp file
- They can unload the library by calling
Arena#close(seeSymbolLookup#libraryLookupdocumentation)
On Linux that might not matter that much, but on Windows you cannot delete the library file while it is still loaded which prevents clean-up of a temporarily extracted library file
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Marcono1234
reviewed
Sep 1, 2024
bindings/java/src/main/java/io/github/treesitter/jtreesitter/java/TreeSitterJava.java
Outdated
Show resolved
Hide resolved
eafc981 to
5a52d1d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These bindings are not (yet?) included in the template.
The
pom.xmlincludes the required metadata and plugin for publishing to Maven Central via the new Central Portal.The bindings can be added to the template after the
generatecommand supports metadata options.