tree_haver v3.2.3 released!
3.2.3 - 2026-01-02
- TAG: v3.2.3
- COVERAGE: 94.91% โ 2088/2200 lines in 22 files
- BRANCH COVERAGE: 81.37% โ 738/907 branches in 22 files
- 90.14% documented
Fixed
parser_fornow respects explicitly requested non-native backends - Previously,parser_forwould always try tree-sitter backends first and only fall back to alternative backends if tree-sitter was unavailable. Now it checkseffective_backendand skips tree-sitter attempts entirely when a non-native backend is explicitly requested via:TREE_HAVER_BACKEND=citrus(orprism,psych,commonmarker,markly)TreeHaver.backend = :citrusTreeHaver.with_backend(:citrus) { ... }
Native backends (
:mri,:rust,:ffi,:java) still use tree-sitter grammar discovery.-
load_tree_sitter_languagenow correctly ignores Citrus registrations - Previously, if a language was registered with Citrus first,load_tree_sitter_languagewould incorrectly try to use it even when a native backend was explicitly requested. Now it only uses registrations that have a:tree_sitterkey, allowing proper backend switching between Citrus and native tree-sitter backends. -
load_tree_sitter_languagenow validates registered paths exist - Previously, if a language had a stale/invalid tree-sitter registration with a non-existent path (e.g., from a test), the code would try to use it and fail. Now it checksFile.exist?(path)before using a registered path, falling back to auto-discovery viaGrammarFinderif the registered path doesnโt exist. -
Language.method_missingno longer falls back to Citrus when native backend explicitly requested - Previously, when tree-sitter loading failed (e.g., .so file missing), the code would silently fall back to Citrus even if the user explicitly requested:mri,:rust,:ffi, or:java. Now fallback to Citrus only happens wheneffective_backendis:auto. This is a breaking change for users who relied on silent fallback behavior. - Simplified
parser_forimplementation - Refactored from complex nested conditionals to cleaner helper methods (load_tree_sitter_language,load_citrus_language). The logic is now easier to follow and maintain.
Many paths lead to being a sponsor or a backer of this project. Are you on such a path?