pub fn resolve(
summaries: &[(Summary, ResolveOpts)],
replacements: &[(PackageIdSpec, Dependency)],
registry: &mut dyn Registry,
try_to_use: &HashSet<PackageId>,
config: Option<&Config>,
check_public_visible_dependencies: bool
) -> CargoResult<Resolve>
Expand description
Builds the list of all packages required to build the first argument.
-
summaries
- the list of package summaries along with how to resolve their features. This is a list of all top-level packages that are intended to be part of the lock file (resolve output). These typically are a list of all workspace members. -
replacements
- this is a list of[replace]
directives found in the root of the workspace. The list here is aPackageIdSpec
of what to replace and aDependency
to replace that with. In general it’s not recommended to use[replace]
any more and use[patch]
instead, which is supported elsewhere. -
registry
- this is the source from which all package summaries are loaded. It’s expected that this is extensively configured ahead of time and is idempotent with our requests to it (aka returns the same results for the same query every time). Typically this is an instance of aPackageRegistry
. -
try_to_use
- this is a list of package IDs which were previously found in the lock file. We heuristically prefer the ids listed intry_to_use
when sorting candidates to activate, but otherwise this isn’t used anywhere else. -
config
- a location to print warnings and such, orNone
if no warnings should be printed -
check_public_visible_dependencies
- a flag for whether to enforce the restrictions introduced in the “public & private dependencies” RFC (1977). The current implementation makes sure that there is only one version of each name visible to each package.But there are 2 stable ways to directly depend on different versions of the same name.
- Use the renamed dependencies functionality
- Use ‘cfg({})’ dependencies functionality
When we have a decision for how to implement is without breaking existing functionality this flag can be removed.