aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart-registry/src/vcs_bridge.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-02-23 12:10:44 +0900
committernsfisis <nsfisis@gmail.com>2026-02-23 12:14:11 +0900
commitd8ecb21a7931ec6f1d7b447d0c15f53de32bfc45 (patch)
tree0da1e0c2ec988905b98939b524b72217e83019de /crates/mozart-registry/src/vcs_bridge.rs
parent0080efea9386d46f65d1862fcb90eb44999d9761 (diff)
downloadphp-mozart-d8ecb21a7931ec6f1d7b447d0c15f53de32bfc45.tar.gz
php-mozart-d8ecb21a7931ec6f1d7b447d0c15f53de32bfc45.tar.zst
php-mozart-d8ecb21a7931ec6f1d7b447d0c15f53de32bfc45.zip
refactor(vcs): convert VcsDriver trait to native async
Replace manual tokio::runtime::Handle::current().block_on() calls with native async/await throughout all VCS drivers. Introduce AnyVcsDriver enum for static dispatch to avoid dyn trait with async methods. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart-registry/src/vcs_bridge.rs')
-rw-r--r--crates/mozart-registry/src/vcs_bridge.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/mozart-registry/src/vcs_bridge.rs b/crates/mozart-registry/src/vcs_bridge.rs
index d81cae8..78aaaa5 100644
--- a/crates/mozart-registry/src/vcs_bridge.rs
+++ b/crates/mozart-registry/src/vcs_bridge.rs
@@ -16,7 +16,7 @@ use crate::resolver::{parse_normalized, version_stability};
/// Scan all VCS-type repositories and collect package versions.
///
/// Non-VCS repos (e.g. "composer", "package") are silently skipped.
-pub fn scan_vcs_repositories(repositories: &[RawRepository]) -> Vec<VcsPackageVersion> {
+pub async fn scan_vcs_repositories(repositories: &[RawRepository]) -> Vec<VcsPackageVersion> {
let config = DriverConfig::default();
let mut all_versions = Vec::new();
@@ -34,7 +34,7 @@ pub fn scan_vcs_repositories(repositories: &[RawRepository]) -> Vec<VcsPackageVe
let vcs_repo = VcsRepository::new(repo.url.clone(), forced_type, config.clone());
- match vcs_repo.scan() {
+ match vcs_repo.scan().await {
Ok(versions) => {
all_versions.extend(versions);
}