Fix 1872 rust scala lifetime - #2137
Merged
Merged
Conversation
This restores the chart to its correct global state instead of just plotting rust and scala.
Contributor
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.
Summary
Fixes #1872
Fixes #1853
This PR addresses the bug where Rust and Scala lifetime annotations (e.g.
'a,'static,'_) caused function extraction to truncate signatures prematurely. Previously, the parser treated the single quote as the start of an unterminated string literal, causing it to consume the rest of the file until a closing quote or end of file was reached.It also addresses #1853 where angle brackets used as math operators (
<<,>>,>=,<=,->,=>) or surrounded by whitespace incorrectly incremented bracket depth in generic languages, truncating signatures early.Changes:
_count_top_level_argsand_matching_paren_endingitgalaxy/core/detector.pyto explicitly recognize Rust and Scala lifetime patterns and skip them instead of entering string-parsing mode._count_top_level_argsto intelligently skip angle brackets that are adjacent to math operators or whitespace, while perfectly preserving nested generic template closures (e.g.vector<vector<int>>).tri_comparison_chart.svgacross all languages to repair a previous overwrite that limited it to only Rust and Scala..claude/rules/tri-comparison-chart.md) to enforce that the tri-comparison chart must always be regenerated globally using--all.Type of change
[x] Bug fix
[x] Parsing or engine logic (
gitgalaxy/core/detector.py)CI checklist
[x]
python tests/tools/audit_check.pypasses[x]
python tests/tools/crucible_check.pypasses[x]
python tests/tools/tree_sitter_accuracy_audit.py --all --cipasses