Skip to main content

sqry_graph_fields

Macro sqry_graph_fields 

Source
macro_rules! sqry_graph_fields {
    (@decl_rebuild) => { ... };
    (@clone_inner from $this:expr) => { ... };
    (@field_names) => { ... };
}
Expand description

Single source of truth for the CodeGraph field list.

This macro takes a kind-tag selector (@decl_rebuild, @clone_inner from ..., @field_names) and emits a tailored expansion for each consumer. The field-list rows live exactly once, inside this macro body, so any new field is added in one place: here.

§Adding / renaming / removing a field on CodeGraph

  1. Edit the CodeGraph struct in sqry-core/src/graph/unified/concurrent/graph.rs (declaration order matters — match the order here).
  2. Edit the field list below. The @decl_rebuild arm auto-mirrors into RebuildGraph; the @clone_inner arm auto-mirrors into clone_for_rebuild_inner.
  3. Extend RebuildGraph::finalize() with the step that compacts the new field (and, if it carries NodeIds, add a K.A/K.B row
    • NodeIdBearing impl in super::coverage).

Missing step (1) or (2) is a hard E0027 compile error in the let CodeGraph { .. } = ... destructure inside the @clone_inner arm. Step (3) is enforced by the §F tombstone-residue check (Gate 0d) and by the §E incremental-vs-full equivalence harness.