fix(extract): skip Java type parameter references#1518
Closed
oleksii-tumanov wants to merge 1 commit into
Closed
Conversation
480242d to
862008b
Compare
safishamsi
pushed a commit
that referenced
this pull request
Jun 28, 2026
The generic-parent support (#1511) emitted a spurious references/generic_arg edge (and a sourceless stub node) for a bare type parameter — the T in `class Box<T> extends Container<T>` — because the Java extractor had no type- parameter tracking. _java_collect_type_refs now collects the in-scope type- parameter names (walking class/interface/record/method/constructor declarations, including bounded and multiple params) and skips references to them, while keeping every real type. Scoped to the declaring node, so a real class that shares a name with a type parameter elsewhere is still referenced. Ported from PR #1518 by @oleksii-tumanov. Closes the nit flagged when #1511 landed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
safishamsi
added a commit
that referenced
this pull request
Jun 28, 2026
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
|
Thanks @oleksii-tumanov — clean fix for the nit flagged when #1511 landed. Landed on |
safishamsi
pushed a commit
that referenced
this pull request
Jun 28, 2026
A Java record's component types produced no edges, so a record's data dependencies were invisible. The record_declaration handler now emits `references` edges from each component type (field context; generic_arg for type arguments), skipping primitives and — via #1518's in-scope type-parameter filtering — the record's own type parameters. Handles standard, generic, primitive, and varargs components. Ported from PR #1520 by @oleksii-tumanov (clean 3-way onto v8; builds on #1518). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
safishamsi
added a commit
that referenced
this pull request
Jun 28, 2026
Patch over 0.9.0: completes the node-ID work (fully closes #1504 via injective salt #1522), stops origin_file leaking into graph.json (#1516), extends cross-file stub disambiguation to the six dedicated extractors (#1515), Java type-param skip (#1518) + record component refs (#1519), prunes a deleted import's edge on update (#1521), and retries rate-limited (429) requests instead of dropping chunks (#1523). All non-breaking. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 #1517
Result
Label-normalized verification summary from the final extraction:
{ "type_parameter_nodes": [], "type_parameter_reference_edges": [], "retained_edges": [ { "source": "Box", "target": "Base", "relation": "inherits", "confidence": "EXTRACTED" }, { "source": "convert", "target": "Payload", "relation": "references", "context": "generic_arg", "confidence": "EXTRACTED" } ] }Testing
uv run --frozen pytest tests/test_languages.py tests/test_java_type_resolution.py -q -k java_type_parameters(2 passed)uv run --frozen pytest tests/ -q --tb=short(2496 passed, 3 skipped)uv run --frozen ruff check graphify/extract.py tests/test_languages.py tests/test_java_type_resolution.py(passed)