Module transitive_resolver

Module transitive_resolver 

Source
Expand description

Transitive dependency resolution for AGPM.

This module handles the discovery and resolution of transitive dependencies, building dependency graphs, detecting cycles, and providing high-level orchestration for the entire transitive resolution process. It processes dependencies declared within resource files and resolves them in topological order.

§Parallel Processing Algorithm

Transitive dependencies are resolved in parallel batches:

  1. Calculate batch size: min(max(10, CPU cores × 2), remaining queue length)
  2. Extract batch from queue (LIFO order to match serial behavior)
  3. Process batch concurrently using join_all
  4. Repeat until queue empty

Concurrent safety is ensured via Arc<DashMap> for shared state. Each batch processes dependencies independently, with coordination happening through the shared DashMap-backed registries.

Structs§

ResolutionServices
Container for resolution services to reduce parameter count.
TransitiveResolutionParams
Parameters for transitive resolution to reduce function argument count.

Functions§

group_key
Generate unique key for grouping dependencies by source and version.
resolve_with_services
Service-based wrapper for transitive dependency resolution.