#[non_exhaustive]pub struct FetchPreparation {
pub dep_sources: DepSources,
pub in_use: HashMap<PackageName, Vec<ConcreteVersion>>,
pub selection_context: SelectionContext,
pub collided_names: HashSet<PackageName>,
}Expand description
Inputs fetch_latest_versions_parallel needs, derived from a parsed manifest.
Which sources to fetch (deduped, collision-free — see dedup_dependencies_by_source), each
dependency’s currently in-use version(s), and the manifest’s own
deps_core::SelectionContext (e.g. Composer’s minimum-stability, #1433).
Built by prepare_fetch, which consolidates three independently hand-rolled copies of
this exact dedup -> in-use -> selection-context sequence (deps-lsp’s
document/lifecycle.rs and document/fetch.rs, deps-cli’s analyze.rs) so the LSP and
CLI fetch-preparation paths can no longer drift apart (#1433).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.dep_sources: DepSourcesReady to hand to fetch_latest_versions_parallel as-is, or filtered further by a
caller that only wants to fetch a subset (e.g. deps-lsp’s
fetch_registry_versions_for_change, which fetches only added/version-changed
dependencies).
in_use: HashMap<PackageName, Vec<ConcreteVersion>>dep_name -> [in_use_version, ...], from crate::classify::resolved::collect_in_use_versions.
selection_context: SelectionContextThe manifest’s own deps_core::SelectionContext, from
deps_core::ParseResult::selection_context.
collided_names: HashSet<PackageName>Names dropped by dedup_dependencies_by_source’s collision gate — must be merged
into DocumentState::signals.outcomes’ fetch-failure channel by the caller (spec FR-011).