Skip to main content

validate_dependencies

Function validate_dependencies 

Source
pub(crate) fn validate_dependencies(
    declared: &BTreeSet<ObjectId>,
    discovered: &BTreeSet<ObjectId>,
) -> DependencyValidation
Expand description

Cross-reference declared dependencies (from project.toml) against discovered external references (from the compiled dependency graph).

Returns the set difference in both directions:

  • undeclared: discovered but not declared (should be a hard error)
  • unused: declared but not discovered (should be a warning)