pub struct VersionResolutionService { /* private fields */ }Expand description
Service for version resolution and worktree management.
Provides high-level orchestration for version constraint resolution, SHA resolution, and worktree preparation for Git-backed dependencies.
Implementations§
Source§impl VersionResolutionService
impl VersionResolutionService
Sourcepub async fn pre_sync_sources(
&mut self,
core: &ResolutionCore,
deps: &[(String, ResourceDependency)],
) -> Result<()>
pub async fn pre_sync_sources( &mut self, core: &ResolutionCore, deps: &[(String, ResourceDependency)], ) -> Result<()>
Pre-sync all source repositories needed for dependencies.
This performs all Git network operations upfront:
- Clone/fetch source repositories
- Resolve version constraints to commit SHAs
- Create worktrees for resolved commits
§Arguments
core- The resolution core with cache and source managerdeps- All dependencies that need sources synced
Sourcepub fn get_prepared_version(
&self,
group_key: &str,
) -> Option<&PreparedSourceVersion>
pub fn get_prepared_version( &self, group_key: &str, ) -> Option<&PreparedSourceVersion>
Sourcepub fn prepared_versions(&self) -> &HashMap<String, PreparedSourceVersion>
pub fn prepared_versions(&self) -> &HashMap<String, PreparedSourceVersion>
Get the prepared versions map.
Returns a reference to the HashMap of prepared source versions.
Sourcepub async fn prepare_additional_version(
&mut self,
core: &ResolutionCore,
source_name: &str,
version: Option<&str>,
) -> Result<()>
pub async fn prepare_additional_version( &mut self, core: &ResolutionCore, source_name: &str, version: Option<&str>, ) -> Result<()>
Prepare an additional version on-demand without clearing existing ones.
This is used for transitive dependencies discovered during resolution.
Unlike pre_sync_sources, this doesn’t clear existing prepared versions.
§Arguments
core- The resolution core with cache and source managersource_name- Name of the source repositoryversion- Optional version constraint (None = HEAD)
Sourcepub async fn get_available_versions(
_core: &ResolutionCore,
repo_path: &Path,
) -> Result<Vec<String>>
pub async fn get_available_versions( _core: &ResolutionCore, repo_path: &Path, ) -> Result<Vec<String>>
Auto Trait Implementations§
impl Freeze for VersionResolutionService
impl !RefUnwindSafe for VersionResolutionService
impl Send for VersionResolutionService
impl Sync for VersionResolutionService
impl Unpin for VersionResolutionService
impl !UnwindSafe for VersionResolutionService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more