Skip to content

fix: emit missing symbol information - #226

Merged
chrapkowski-sg merged 6 commits into
sourcegraph:scipfrom
brendan-m-murphy:codex/issue-223-symbol-information
Nov 2, 2026
Merged

chrapkowski-sg merged 6 commits into
sourcegraph:scipfrom
brendan-m-murphy:codex/issue-223-symbol-information

Conversation

@brendan-m-murphy

@brendan-m-murphy brendan-m-murphy commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #223.

Ensures cached class definitions still emit SymbolInformation and records identity-only information for undocumented external symbols. Retains the reported reproduction and structural regression checks.

Empty external records can acquire documentation from later visits; populated records are never replaced by empty placeholders. This avoids making documentation depend on import order. Local modules shadowing installed packages must not acquire external records.

External-symbol metadata is optional in SCIP. The structural checks establish this project's compatibility expectations; they are not a claim that every external reference requires metadata under the protocol.

Verification

  • Added real-indexing checks for both import numbers / from numbers import Real orders and a local module shadowing an installed package.
  • Production/development builds, all 22 snapshot tests, all 7 SCIP Jest tests, and formatting passed locally on Linux with Node 24.4.1 and Python 3.10.22.
  • The existing Linux/macOS snapshot workflow now also runs the SCIP Jest suite after installation/build; previously it omitted that suite.
  • The OpenGHG/SQLite measurements in the contributor's comment are separate contributor-reported evidence, not independently repeated in this validation. Native Windows/macOS execution was not performed locally.

@brendan-m-murphy

Copy link
Copy Markdown
Contributor Author

I know it's bad form... but this is one-shot from codex. This PR does fix the bug I encountered though:

I tested this fix against OpenGHG, a medium-sized Python package for processing atmospheric greenhouse-gas measurement and modelling data.

Using the same OpenGHG checkout and scip-cli 2.7.0:

  • Released scip-python 0.6.6 indexed 275 files, but conversion to SQLite failed because VersioneerBadRootError# had a definition occurrence without corresponding SymbolInformation.
  • A build from this PR also indexed 275 files and converted successfully.
  • The resulting 7.2 MB database contained 6,666 global symbols and 18,650 mentions.
  • As a functional check, scip-cli successfully resolved Datasource.add_timed_data to its definition in openghg.objectstore._legacy_datasource.

This is a controlled before/after test and confirms that the PR fixes the missing-SymbolInformation failure on a real-world Python codebase.

(Again, apologies for the AI generated summary... scip-python seems useful and I want to try it out, but I don't have time to dig into the code myself.)

@chrapkowski-sg
chrapkowski-sg marked this pull request as ready for review November 2, 2026 22:00
@chrapkowski-sg
chrapkowski-sg merged commit 3fe7f97 into sourcegraph:scip Nov 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

scip-python 0.6.6: SymbolInformation missing for @dataclass class symbols and stdlib symbols, causing scip expt-convert to hard-fail

2 participants