Skip to content

fix(scip): route SymbolInformation.kind by the SCIP schema numbers - #1742

Merged
Shashankss1205 merged 1 commit into
CodeGraphContext:mainfrom
PhysShell:fix/scip-modern-kind-routing
Oct 15, 2026
Merged

Shashankss1205 merged 1 commit into
CodeGraphContext:mainfrom
PhysShell:fix/scip-modern-kind-routing

Conversation

@PhysShell

Copy link
Copy Markdown
Contributor

Summary

ScipIndexParser routed definitions with kind 18 as Enum, 20 as Interface and 54 as Protocol. In scip.proto
those numbers are Getter, Instance and Type; Enum is 11, Interface 21 and Protocol 42. Producers that report
real kinds therefore lost their interfaces, enums and protocols, and a getter was filed as an enum. For example,
scip-go reports type Reader interface as kind 21, and CGC dropped it.

The kinds CGC infers for producers that report 0 used the same old numbers (C/C++ enum 18, an interface detected from
source 20). They move to the schema values too, so routing has a single numbering for real and inferred kinds. Keeping
18 as an Enum alias was not an option, because a real 18 is a Getter.

The routed kinds now come from scip_pb2.SymbolInformation (Enum, Interface, Protocol) instead of literals.
scip_indexer.py: +10 / −6. No new node types: kinds without a representation (Getter, Instance, Type, …) are still not
materialized; they are just no longer mistaken for Enum / Interface / Protocol.

Tests

  • tests/unit/tools/test_scip_modern_kinds.py (new): kinds 11 / 21 / 42 reach enums / interfaces; Getter 18 is
    not an enum, Instance 20 and Type 54 are not interfaces; class / struct / trait / function / method / field / variable
    unchanged; kind-0 fallbacks (source interface, C++ enum) still land in interfaces / enums. 7 of these cases fail
    on main.
  • tests/unit/tools/test_scip_indexer_c_family.py: _infer_cxx_zero_kind now returns 11 for C/C++ enums.
  • Real producer: scip-go (scip-code/scip-go@28f28d8) on a small Go package. Reported kinds: Reader 21, Item 49,
    Name 15, Make 17, Item.Read 26. On main the parser drops Reader; with this change it is an interface, and
    every other node is unchanged.
  • ./tests/run_tests.sh fast (Python 3.12): 1623 passed, 8 skipped, 0 failed (main: 1608 passed, 8 skipped,
    0 failed; the difference is the new tests).
  • The change also applies cleanly on top of fix(scip): recognise scip-dotnet (+N) overloads and drop the marker from names #1740, and the SCIP tests pass with both.

Not in scope

Discovered separately: scip-go writes only the typed Occurrence range fields, which the bundled scip_pb2 does not
know yet; that is a separate change.

🤖 Generated with Claude Code

ScipIndexParser treated kind 18 as Enum, 20 as Interface and 54 as
Protocol. In scip.proto those are Getter, Instance and Type; Enum is 11,
Interface 21 and Protocol 42. Producers that report real kinds therefore
lost their interfaces, enums and protocols (scip-go's Reader interface,
kind 21, was dropped), while a getter was filed as an enum.

The kinds CGC infers for producers that report 0 used the same old
numbers (C/C++ enum 18, source-detected interface 20), so they move to
the schema values too: routing now has one numbering for both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vercel

vercel Bot commented Sep 28, 2026

Copy link
Copy Markdown

@PhysShell is attempting to deploy a commit to the shashankss1205's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Shashankss1205 Shashankss1205 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrects SCIP Enum/Interface/Protocol schema enum values. Targeted tests pass in combined candidate; pair with #1743 for modern producer compatibility.

@Shashankss1205
Shashankss1205 merged commit 80f485c into CodeGraphContext:main Oct 15, 2026
1 check failed
@github-project-automation github-project-automation Bot moved this from Backlog tasks to Done in CGC Progress Board Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants