- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 128
feat: add java bindings #182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
da35af9    to
    eafc981      
    Compare
  
    | 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
        
          
                bindings/java/src/main/java/io/github/treesitter/jtreesitter/java/TreeSitterJava.java
              
                Outdated
          
            Show resolved
            Hide resolved
        
      eafc981    to
    5a52d1d      
    Compare
  
    
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.