Repository navigation
build: translator extra (tree-sitter-language-pack) with a clear missing-install error - #4430
Merged
Merged
Conversation
pyproject gains `translator = ["tree-sitter-language-pack"]` (not in `full`, dependencies stay empty). det/layout._parser and det/stmt.parse load the parser through det/source.cobol_parser, which turns a missing install into "the COBOL-to-Java translator needs tree-sitter-language-pack: pip install gitgalaxy[translator]". README's install block lists the extra. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
squid-protocol
marked this pull request as ready for review
October 5, 2026 11:23
squid-protocol
added a commit
that referenced
this pull request
Oct 5, 2026
… tests) Co-Authored-By: Claude Opus 5.5 <[email protected]>
squid-protocol
added a commit
that referenced
this pull request
Oct 5, 2026
Imports: union of #4412's as_fixed_rows/unwrap and #4430's cobol_parser. Error lines keep #4412's line_of row map. Tests: keep both blocks. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz
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.
Adds an opt-in
translatorextra for the deterministic COBOL-to-Java translator (gitgalaxy/tools/cobol_to_java/det).pyproject.toml:translator = ["tree-sitter-language-pack"]under[project.optional-dependencies]. Not added tofull, which holds the scan engines only.dependencies = []is unchanged, so a plainpip install gitgalaxystill installs nothing.det/source.cobol_parser()is now the single lazy loader.det/layout._parser()anddet/stmt.parse()both go through it. A missing install raisesImportError("the COBOL-to-Java translator needs tree-sitter-language-pack: pip install gitgalaxy[translator]")instead of a bare ModuleNotFoundError.stmt.parsestill loads the parser first, before doing any other work.test_missing_language_pack_names_the_translator_extrablocks the import and checks that both entry points give the message.Translator output is unchanged: it is the same parser, loaded the same lazy way.
Other code that loads tree-sitter-language-pack. Nothing else under
gitgalaxy/. Outside the package it is loaded only by verification tooling undertests/tools/:tri_comparison_gatherer.py,tri_comparison_ledger.py,tree_sitter_accuracy_audit.py,unicode_gauntlet_vs_treesitter.py,class_start_diff.py,call_graph_accuracy.py,import_graph_accuracy.py, plus their tests. The existingtri-comparisonextra and the audit workflows cover those. The det testsimportorskipit, and CI's smoke-test pinstree-sitter-language-pack==1.20.0.Gates:
pr_gates.py --fast5/5 pass. det tests: 29 passed; the JDK and Docker tests skip locally.🤖 Generated with Claude Code