fn enqueue(
seen: &mut BTreeSet<CatalogItemId>,
stack: &mut Vec<CatalogItemId>,
id: CatalogItemId,
max_rw_dependencies: usize,
) -> Result<(), AdapterError>Expand description
Adds id to the worklist the first time it is seen, enforcing the
dependency bound.
Deduping at enqueue time keeps seen and stack proportional to the number
of distinct objects, not the number of dependency edges. A diamond-shaped
graph is validated once per object.