afnanenayet / diffsitter

A tree-sitter based AST difftool to get meaningful semantic diffs
MIT License
1.59k stars 29 forks source link

fix(grammars): Leak language after loading #786

Closed afnanenayet closed 8 months ago

afnanenayet commented 8 months ago

Leak the shared library from libloading when loading a tree-sitter Language. This should fix a segfault that can occur when trying to use the dynamic grammar loading feature.

This also introduces a new binary with utilities for diffsitter, which are mostly helpful for debugging. We decided to split out the utilities to keep the interface for the main diffsitter binary less bloated.

codecov-commenter commented 8 months ago

Codecov Report

Attention: 37 lines in your changes are missing coverage. Please review.

Comparison is base (2faf7d2) 60.16% compared to head (bf8e49f) 58.68%.

Files Patch % Lines
src/parse.rs 4.34% 22 Missing :warning:
src/bin/diffsitter_utils.rs 0.00% 15 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #786 +/- ## ========================================== - Coverage 60.16% 58.68% -1.49% ========================================== Files 13 14 +1 Lines 1544 1583 +39 ========================================== Hits 929 929 - Misses 615 654 +39 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.