Skip to main content

sync

Function sync 

Source
pub fn sync(
    project: &Project,
    install_missing: bool,
    resolve: bool,
    log: impl FnMut(&str),
) -> Result<Vec<Synced>, Vec<String>>
Expand description

Make every declared package available, installing what’s missing (unless install is false, in which case missing packages are errors). Honours dre.lock pins, writes new pins.

With resolve (dre deps), a package that dre.lock doesn’t pin is resolved against the registry even when some matching version is already installed, so deleting dre.lock picks up the newest allowed release. Without it (auto-install before run/validate), any installed match will do and the registry is only consulted for what’s missing.