GitNexus/MIGRATION.md
Gergo Magyar 3c5079f044 feat: disambiguate overloaded method node IDs with #<paramCount> arity suffix
Method and Constructor node IDs now include a #<paramCount> suffix to
distinguish overloaded methods: Method:file:Class.method#1 vs #2.

Core changes:
- Reorder parameter extraction before generateId in both parsing-processor.ts
  (sequential) and parse-worker.ts (worker) so arity is available at ID time
- Add arity suffix to findEnclosingFunctionId in both call-processor.ts and
  parse-worker.ts so CALLS/ACCESSES edge sourceIds match definition-phase IDs
- Strip #<arity> in extractFuncNameFromSourceId for receiver-type index lookups
- Fix resolveMethodReturnType to handle class names directly as receiver types
  (pre-existing latent bug surfaced by substituteThisReceiver + fixpoint interaction)
- Add MIGRATION.md documenting OVERRIDES → METHOD_OVERRIDES rename
- Update ARCHITECTURE.md Known Limitations with overload resolution status

Same-arity overloads (same param count, different types) remain collapsed —
deferred to future type-hash enhancement (issue #574).

All 2896 unit tests + 2213 integration tests pass.
2026-04-04 09:22:11 +01:00

1 KiB

Migration Guide

OVERRIDES → METHOD_OVERRIDES (PR #642)

The OVERRIDES relationship type has been renamed to METHOD_OVERRIDES for consistency with the new METHOD_IMPLEMENTS edge type.

Do I need to migrate?

No. Backward compatibility is handled automatically at runtime:

  • local-backend.ts dual-reads both OVERRIDES and METHOD_OVERRIDES in all impact-analysis and context queries. Existing stored graphs with OVERRIDES edges continue to return correct results without any manual intervention.
  • The REL_TYPES array in schema-constants.ts includes both names so Cypher queries that reference either will work.

What happens on re-index?

Running npx gitnexus analyze on a repository produces METHOD_OVERRIDES edges going forward. The old OVERRIDES edges are replaced as part of the normal full re-index.

When will the legacy alias be removed?

The OVERRIDES compat alias will remain until a future major version. Removal will be announced in this file and in the changelog before it happens.