Skip to main content

Module diff

Module diff 

Source
Expand description

Structural diff engine for comparing two API surfaces.

This module is language-agnostic. It operates on ApiSurface instances produced by language-specific ApiExtractor implementations and produces StructuralChange entries.

Type comparison is done via canonicalized string equality — the ApiExtractor is responsible for normalizing types before they reach this function.

§Module structure

  • [compare] — Individual comparison functions (visibility, modifiers, hierarchy, signatures, members).
  • [rename] — Rename detection via fingerprint matching + name similarity.
  • [relocate] — Path-based relocation detection (moved to deprecated, etc.).
  • [helpers] — Shared utility functions (change builders, summaries).

Functions§

diff_surfaces
Compare two API surfaces using minimal semantics (no language-specific rules).
diff_surfaces_with_semantics
Compare two API surfaces using language-specific semantic rules.