Skip to main content

detect_consumes_cycles

Function detect_consumes_cycles 

Source
pub fn detect_consumes_cycles(
    consumes: &HashMap<String, Vec<String>>,
    sites: &HashMap<(String, String), (PathBuf, Span)>,
    errors: &mut Vec<(Option<PathBuf>, CompileError)>,
)
Expand description

#696: sites maps a (consumer, target) edge to the project-relative identity_path and span of the consumes clause that declares it. When a cycle is detected the diagnostic is anchored on its closing edge’s clause (a real span in a real file) so the CLI renders ariadne source context; an edge absent from sites (e.g. a synthetic adapter’s) yields an unattributed, spanless diagnostic as before.