Skip to main content

Module graph

Module graph 

Source
Expand description

Materialized context graph with Glean-style immutable fact layering.

The graph is a petgraph StableGraph (stable indices across mutations) wrapped with typed operations, ownership tracking, and query methods.

Key design decisions:

  • StableGraph for stable NodeIndex/EdgeIndex across removals (petgraph docs)
  • Glean-style layers: each “fact layer” is an overlay that can add or hide facts from layers below. When a file changes, all facts owned by that file are hidden, and only affected files are re-indexed. O(changes) cost.
  • SCIP identity: entities identified by globally-unique strings, so files can be re-indexed independently without graph-local ID coordination.

References:

  • petgraph StableGraph: https://docs.rs/petgraph
  • Meta Glean fact stacking: https://glean.software/docs/angle/incrementality
  • Sourcegraph SCIP: https://github.com/sourcegraph/scip

Structs§

GraphStats
Graph statistics summary.
ImpactedEntity
An entity identified as impacted by a change.
NotImpactedEntity
An entity determined to NOT be impacted by a change.
UcmGraph
The materialized context graph — primary queryable data structure.

Enums§

ImpactType