pub struct DependencyResolver { /* private fields */ }Expand description
Main dependency resolver with service-based architecture.
This orchestrates multiple specialized services to handle different aspects of the dependency resolution process while maintaining compatibility with existing interfaces.
Implementations§
Source§impl DependencyResolver
impl DependencyResolver
Sourcepub async fn new_with_context(
manifest: Manifest,
cache: Cache,
operation_context: Option<Arc<OperationContext>>,
) -> Result<Self>
pub async fn new_with_context( manifest: Manifest, cache: Cache, operation_context: Option<Arc<OperationContext>>, ) -> Result<Self>
Sourcepub async fn new_with_global(manifest: Manifest, cache: Cache) -> Result<Self>
pub async fn new_with_global(manifest: Manifest, cache: Cache) -> Result<Self>
Create a new resolver with global configuration support.
This loads both manifest sources and global sources from ~/.agpm/config.toml.
§Arguments
manifest- Project manifest with dependenciescache- Cache for Git operations and worktrees
§Errors
Returns an error if global configuration cannot be loaded
Sourcepub async fn with_cache(manifest: Manifest, cache: Cache) -> Result<Self>
pub async fn with_cache(manifest: Manifest, cache: Cache) -> Result<Self>
Sourcepub async fn new_with_global_context(
manifest: Manifest,
cache: Cache,
_operation_context: Option<Arc<OperationContext>>,
) -> Result<Self>
pub async fn new_with_global_context( manifest: Manifest, cache: Cache, _operation_context: Option<Arc<OperationContext>>, ) -> Result<Self>
Create a new resolver with global configuration and operation context.
This loads both manifest sources and global sources from ~/.agpm/config.toml.
§Arguments
manifest- Project manifest with dependenciescache- Cache for Git operations and worktreesoperation_context- Optional context for warning deduplication
§Errors
Returns an error if global configuration cannot be loaded
Sourcepub fn core(&self) -> &ResolutionCore
pub fn core(&self) -> &ResolutionCore
Get a reference to the resolution core.
Sourcepub async fn resolve(&mut self) -> Result<LockFile>
pub async fn resolve(&mut self) -> Result<LockFile>
Resolve all dependencies and generate a complete lockfile.
This is the main resolution method.
§Errors
Returns an error if any step of resolution fails
Sourcepub async fn resolve_with_options(
&mut self,
enable_transitive: bool,
) -> Result<LockFile>
pub async fn resolve_with_options( &mut self, enable_transitive: bool, ) -> Result<LockFile>
Sourcepub async fn pre_sync_sources(
&mut self,
deps: &[(String, ResourceDependency)],
) -> Result<()>
pub async fn pre_sync_sources( &mut self, deps: &[(String, ResourceDependency)], ) -> Result<()>
Sourcepub async fn update(
&mut self,
existing: &LockFile,
deps_to_update: Option<Vec<String>>,
) -> Result<LockFile>
pub async fn update( &mut self, existing: &LockFile, deps_to_update: Option<Vec<String>>, ) -> Result<LockFile>
Sourcepub fn operation_context(&self) -> Option<&Arc<OperationContext>>
pub fn operation_context(&self) -> Option<&Arc<OperationContext>>
Get current operation context if available.
Sourcepub fn set_operation_context(&mut self, context: Arc<OperationContext>)
pub fn set_operation_context(&mut self, context: Arc<OperationContext>)
Set the operation context for warning deduplication.
§Arguments
context- The operation context to use