From 0080efea9386d46f65d1862fcb90eb44999d9761 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 23 Feb 2026 11:38:42 +0900 Subject: feat(vcs): add mozart-vcs crate for VCS repository support Implement VCS driver/downloader infrastructure mirroring Composer's VCS subsystem. Includes drivers for GitHub, GitLab, Bitbucket, Forgejo, Git, Hg, and SVN with API-based metadata resolution, plus source downloaders for Git/Hg/SVN. Integrates into mozart-registry via vcs_bridge module to scan VCS repositories and feed discovered packages into the SAT resolver. Co-Authored-By: Claude Opus 4.6 --- crates/mozart/src/commands/update.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'crates/mozart/src/commands/update.rs') diff --git a/crates/mozart/src/commands/update.rs b/crates/mozart/src/commands/update.rs index 06e6b22..c1901cd 100644 --- a/crates/mozart/src/commands/update.rs +++ b/crates/mozart/src/commands/update.rs @@ -835,6 +835,7 @@ pub async fn execute( ignore_platform_req_list: args.ignore_platform_req.clone(), repo_cache: None, temporary_constraints, + repositories: composer_json.repositories.clone(), }; // Step 6: Print header and run resolver @@ -1164,18 +1165,13 @@ pub async fn execute( // Step 12: Install packages (unless --no-install or --dry-run) if !args.no_install && !args.dry_run { - // Warn about prefer-source (not yet supported) + // Determine if prefer-source is enabled let prefer_source = args.prefer_source || args .prefer_install .as_deref() .map(|s| s.eq_ignore_ascii_case("source")) .unwrap_or(false); - if prefer_source { - console.info(&console_format!( - "Warning: Source installs are not yet supported. Falling back to dist." - )); - } super::install::install_from_lock( &new_lock, @@ -1193,6 +1189,7 @@ pub async fn execute( apcu_autoloader: args.apcu_autoloader || args.apcu_autoloader_prefix.is_some(), apcu_autoloader_prefix: args.apcu_autoloader_prefix.clone(), download_only: false, + prefer_source, }, ) .await?; @@ -1909,6 +1906,7 @@ mod tests { ignore_platform_req_list: vec![], repo_cache: None, temporary_constraints: HashMap::new(), + repositories: vec![], }; let resolved = resolve(&request).await.expect("Resolution should succeed"); -- cgit v1.3.1