Expand description
A package’s public API at an op, and how it changed between two ops — the event source for the version-bump gate (#893) and, later, dependency change-propagation.
A package’s public surface is its top-level functions and types (a Lex
import "<pkg>/mod" exposes the module’s top-level names). Two versions’
surfaces are compared structurally: a function’s signature is the JSON of
its (param types, return type, effects) — never its body or examples, so
a pure body change is a patch, not an API change. Names carry their
path-derived mangle prefix (schema_a1b2.validate), which is stable across
versions, so mangled names compare directly without de-mangling.
Structs§
- Rename
- A detected rename: a public name that disappeared and reappeared under a
new name with the same signature — a drop-in rename that can propagate
mechanically (
nt.gcd→nt.euclidean_gcd). Names are bare (mangle prefix stripped) so they feedlex propagate --rename old=newdirectly.
Enums§
- ApiChange
- How a package’s public API changed between two releases.
Functions§
- classify_
api_ change - Classify the change from
prevtonew. Breaking dominates additive: a release that both removes one name and adds another is Breaking. - detect_
renames - Detect renames between two public APIs: pair each removed declaration with an added one that has an identical signature. A signature shared by several removed/added names is ambiguous and left unpaired (a rename can’t be inferred safely), so only unambiguous 1:1 matches are returned.
- public_
api_ at_ op - Extract the public API at
op_id: every top-level fn/type declaration keyed by name, valued by a structural signature that ignores body and examples.
Type Aliases§
- Public
Api - The public API at a head: declaration name → a structural signature string.